summaryrefslogtreecommitdiffstats
path: root/include/bcm5719_SHM.h
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2020-04-11 20:34:40 -0600
committerGitHub <noreply@github.com>2020-04-11 20:34:40 -0600
commita985bfd6cdbe977e02c72de85f958e74ddf372e7 (patch)
tree49fca1761d01f1ed258738b8772df7684e4338e6 /include/bcm5719_SHM.h
parentdc9705b4c65aa6b059a2f6beaf4d370620e583b7 (diff)
downloadbcm5719-ortega-a985bfd6cdbe977e02c72de85f958e74ddf372e7.tar.gz
bcm5719-ortega-a985bfd6cdbe977e02c72de85f958e74ddf372e7.zip
coverity: Fix issues found with coverity (#78)
Diffstat (limited to 'include/bcm5719_SHM.h')
-rw-r--r--include/bcm5719_SHM.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/bcm5719_SHM.h b/include/bcm5719_SHM.h
index 000480b..00ea0db 100644
--- a/include/bcm5719_SHM.h
+++ b/include/bcm5719_SHM.h
@@ -1723,7 +1723,14 @@ typedef struct SHM_t {
RegSHMRcpuPrintfBuffer_t RcpuPrintfBuffer[372];
#ifdef CXX_SIMULATOR
- SHM_t()
+ typedef uint32_t (*callback_t)(uint32_t, uint32_t, void*);
+ callback_t mIndexReadCallback;
+ void* mIndexReadCallbackArgs;
+
+ callback_t mIndexWriteCallback;
+ void* mIndexWriteCallbackArgs;
+
+ SHM_t() : mIndexReadCallback(0), mIndexReadCallbackArgs(0), mIndexWriteCallback(0), mIndexWriteCallbackArgs(0)
{
SegSig.r32.setComponentOffset(0x0);
ApeSegLength.r32.setComponentOffset(0x4);
@@ -1893,13 +1900,6 @@ typedef struct SHM_t {
RcpuPrintfBuffer[i].print();
}
}
- typedef uint32_t (*callback_t)(uint32_t, uint32_t, void*);
- callback_t mIndexReadCallback;
- void* mIndexReadCallbackArgs;
-
- callback_t mIndexWriteCallback;
- void* mIndexWriteCallbackArgs;
-
uint32_t read(int offset) { return mIndexReadCallback(0, offset, mIndexReadCallbackArgs); }
void write(int offset, uint32_t value) { (void)mIndexWriteCallback(value, offset, mIndexWriteCallbackArgs); }
#endif /* CXX_SIMULATOR */
OpenPOWER on IntegriCloud