Static analyzer reports uninitialized variable warnings for variables passed to OSAL/CFE functions, even though the real implementations properly initialize ouputs.
While not a runtime bug, initializing these variables:
- Eliminates false positive static analysis warnings
- Follows defensive programming practices
- Makes code more maintainable
- Self-documents expected initial state
Locations:
- CFE_TBL_TxnOpenTableDumpFile: FileDescriptor
- CFE_SB_ReceiveTxn_PipeHandler: BufDscPtr
- CFE_TBL_WriteSnapshotToFile: FileDescriptor
- TestCDSName: IdByName
- TestCounterIDToIndex: CounterIdx
- TestAppIDToIndex: TestAppIdx
- TestPipeName: PipeNameBuf
Static analyzer reports uninitialized variable warnings for variables passed to OSAL/CFE functions, even though the real implementations properly initialize ouputs.
While not a runtime bug, initializing these variables:
Locations: