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

Add validation for returncode and fix bracket to standard #17

Closed
avan989 opened this issue Oct 1, 2019 · 0 comments · Fixed by #20
Closed

Add validation for returncode and fix bracket to standard #17

avan989 opened this issue Oct 1, 2019 · 0 comments · Fixed by #20
Assignees
Labels
bug Something isn't working
Milestone

Comments

@avan989
Copy link
Contributor

avan989 commented Oct 1, 2019

Is your feature request related to a problem? Please describe.
Build with options : -Wall -std=c99 -pedantic -Wstrict-prototypes -Wwrite-strings
two warning appear:

/media/sf_share/cFS/tools/elf2cfetbl/elf2cfetbl.c:134:43: warning: missing braces around initializer [-Wmissing-braces]
union Elf_Shdr SectionHeaderStringTable = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
^
{ }
/media/sf_share/cFS/tools/elf2cfetbl/elf2cfetbl.c: In function ‘OpenSrcFile’:
/media/sf_share/cFS/tools/elf2cfetbl/elf2cfetbl.c:1357:9: warning: variable ‘RtnCode’ set but not used [-Wunused-but-set-variable]
int RtnCode;
^~~~~~~

Describe the solution you'd like
First issues, add second bracket:
union Elf_Shdr SectionHeaderStringTable = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }};

second issue:
Add validation for return code.

Requester Info
Anh Van, NASA Goddard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants