Skip to content

Fix #53, initialize local variables#83

Merged
astrogeco merged 1 commit intonasa:mainfrom
jphickey:fix-53-init-all-local-bufs
Dec 8, 2021
Merged

Fix #53, initialize local variables#83
astrogeco merged 1 commit intonasa:mainfrom
jphickey:fix-53-init-all-local-bufs

Conversation

@jphickey
Copy link
Copy Markdown
Contributor

@jphickey jphickey commented Dec 1, 2021

Whenever the value of a local variable not directly set by the test code, make sure to set it to a value so it is
never seen as uninitialized.

Some of these are simply cases where the value is initialized within a loop. Several lines of code triggered warnings that a
value may be used uninitialized, because the compiler logic might not recognize that the loop must run at least once.

In other cases a local buffer structure should be cleared/memset to 0 before being passed along.

Fixes #53

@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Dec 1, 2021
A local buffer structure should be cleared/memset
to 0 before being passed along.
@jphickey jphickey force-pushed the fix-53-init-all-local-bufs branch from 250529a to 8e543a9 Compare December 2, 2021 13:40
@astrogeco astrogeco added CCB:Approved and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Dec 8, 2021
@astrogeco
Copy link
Copy Markdown
Contributor

astrogeco commented Dec 8, 2021

CCB:2021-12-08 - APPROVED

@astrogeco astrogeco mentioned this pull request Dec 8, 2021
@astrogeco astrogeco merged commit 0402e7b into nasa:main Dec 8, 2021
@jphickey jphickey deleted the fix-53-init-all-local-bufs branch December 9, 2021 16:39
@skliper skliper added this to the Draco milestone Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CF tests use uninitialized values in buffers

3 participants