Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local variable hides global in queue-test.c, bin-sem-timeout-test.c, bin-sem-test.c #779

Closed
skliper opened this issue Feb 9, 2021 · 0 comments · Fixed by #794 or #830
Closed

Local variable hides global in queue-test.c, bin-sem-timeout-test.c, bin-sem-test.c #779

skliper opened this issue Feb 9, 2021 · 0 comments · Fixed by #794 or #830
Assignees
Labels
bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Feb 9, 2021

Is your feature request related to a problem? Please describe.

osal_id_t timer_id;

void TimerFunction(osal_id_t timer_id)

Similar in bin-sem-timeout-test.c and bin-sem-test.c

Describe the solution you'd like
Preference is to implement a style such that it's easy to differentiate global vs local variables (local lower case, global camel or similar) or put global variables in a structure (easy to init/clear).

Describe alternatives you've considered
None

Additional context
CodeQL warning

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Feb 9, 2021
@skliper skliper added this to the 6.0.0 milestone Feb 9, 2021
@skliper skliper changed the title Local variable hides global in queue-test.c Local variable hides global in queue-test.c, bin-sem-timeout-test.c, bin-sem-test.c Feb 9, 2021
zanzaben added a commit to zanzaben/osal that referenced this issue Feb 10, 2021
@astrogeco astrogeco added the bug label Feb 24, 2021
astrogeco added a commit that referenced this issue Feb 24, 2021
Fix #779, Change global vars to not be hidden by local vars.
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
3 participants