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

PSP cppcheck warning stricter flag #117

Closed
avan989 opened this issue Dec 6, 2019 · 1 comment · Fixed by #127
Closed

PSP cppcheck warning stricter flag #117

avan989 opened this issue Dec 6, 2019 · 1 comment · Fixed by #127
Labels
enhancement New feature or request
Milestone

Comments

@avan989
Copy link
Contributor

avan989 commented Dec 6, 2019

Is your feature request related to a problem? Please describe.
[psp/fsw/mcp750-vxworks/src/cfe_psp_exception.c:90] ->
[psp/fsw/mcp750-vxworks/src/cfe_psp_exception.c:136]: (style, inconclusive) Function 'CFE_PSP_ExceptionHook' argument 3 names different: declaration 'pEsf' definition 'vpEsf'.
[psp/fsw/pc-linux/src/cfe_psp_memory.c:679] ->
[psp/fsw/pc-linux/src/cfe_psp_memory.c:680]: (style) Variable 'return_code' is reassigned a value before the old one has been used.
[psp/fsw/pc-linux/src/cfe_psp_memory.c:680] ->
[psp/fsw/pc-linux/src/cfe_psp_memory.c:681]: (style) Variable 'return_code' is reassigned a value before the old one has been used.
[psp/fsw/pc-linux/src/cfe_psp_memory.c:681] ->
[psp/fsw/pc-linux/src/cfe_psp_memory.c:682]: (style) Variable 'return_code' is reassigned a value before the old one has been used.
[psp/fsw/pc-linux/src/cfe_psp_memory.c:686] ->
[psp/fsw/pc-linux/src/cfe_psp_memory.c:687]: (style) Variable 'return_code' is reassigned a value before the old one has been used.
[psp/fsw/pc-linux/src/cfe_psp_memory.c:687] ->
[psp/fsw/pc-linux/src/cfe_psp_memory.c:688]: (style) Variable 'return_code' is reassigned a value before the old one has been used.
[psp/fsw/pc-linux/src/cfe_psp_memory.c:688] ->
[psp/fsw/pc-linux/src/cfe_psp_memory.c:689]: (style) Variable 'return_code' is reassigned a value before the old one has been used.
[psp/fsw/pc-rtems/src/cfe_psp_exception.c:138]: (warning, inconclusive) The buffer 'TaskName' may not be null-terminated after the call to strncpy().
[psp/fsw/modules/eeprom_mmap_file/cfe_psp_eeprom_mmap_file.c:191]: (style) Variable 'Status' is assigned a value that is never used.
[psp/fsw/shared/cfe_psp_module.h:106] ->
[psp/fsw/shared/cfe_psp_module.c:111]: (style, inconclusive) Function 'CFE_PSP_Module_FindByName' argument 1 names different: declaration 'ModuleName' definition 'DriverName'.
[psp/fsw/mcp750-vxworks/src/bsp-integration/cfeSupport.c:192]: (style) The scope of the variable 'i' can be reduced.
[psp/fsw/mcp750-vxworks/src/bsp-integration/cfeSupport.c:193]: (style) The scope of the variable 'cfNameFound' can be reduced.
[psp/fsw/mcp750-vxworks/src/bsp-integration/cfeSupport.c:194]: (style) The scope of the variable 'tempFd' can be reduced.
[psp/fsw/mcp750-vxworks/src/bsp-integration/cfeSupport.c:195]: (style) The scope of the variable 'CompactFlashName' can be reduced.
[psp/fsw/shared/cfe_psp_module.c:57]: (style) The scope of the variable 'ApiPtr' can be reduced.

Describe the solution you'd like
Resolve warning

Requester Info
Anh Van, NASA Goddard

@skliper
Copy link
Contributor

skliper commented Dec 6, 2019

For the scope ones, our coding standard actually specifies defines at the top of the function. Could you just suppress that warning on the command line? If you made any changes to reduce scope please back those out.

skliper added a commit that referenced this issue Dec 30, 2019
Fix #117, #119
Reviewed and approved at 2019-12-18 CCB
@skliper skliper added the enhancement New feature or request label Jan 7, 2020
@skliper skliper closed this as completed in 9334835 Jan 8, 2020
@astrogeco astrogeco added this to the 1.5.0 milestone Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants