Skip to content

Uninitialized Variables Pass to Functions / static analysis cleanup #2736

@brandt-nasa

Description

@brandt-nasa

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:

  1. Eliminates false positive static analysis warnings
  2. Follows defensive programming practices
  3. Makes code more maintainable
  4. 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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions