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

Unused rcsid variable throws compile error with newest GCC 7.2.0 #15

Merged
merged 1 commit into from
Nov 27, 2017
Merged

Unused rcsid variable throws compile error with newest GCC 7.2.0 #15

merged 1 commit into from
Nov 27, 2017

Conversation

brainstorm
Copy link
Contributor

@brainstorm brainstorm commented Nov 18, 2017

Hello @tomghuang, this is a nice and handy project!

I hope this change does not trouble your linting routines too much, but the reason I'm requesting it is detailed below:

CC build/console/argtable3/argtable3.o
/Users/romanvg/dev/espressif/esp-idf/components/console/argtable3/argtable3.c: In function 'trex_charnode':
/Users/romanvg/dev/espressif/esp-idf/components/console/argtable3/argtable3.c:3068:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
     if(!isclass) {
       ^
/Users/romanvg/dev/espressif/esp-idf/components/console/argtable3/argtable3.c:3074:4: note: here
    default:
    ^~~~~~~
At top level:
/Users/romanvg/dev/espressif/esp-idf/components/console/argtable3/argtable3.c:273:19: error: 'rcsid' defined but not used [-Werror=unused-const-variable=]
 static const char rcsid[]="$Id: getopt_long.c,v 1.1 2009/10/16 19:50:28 rodney Exp rodney $";
                   ^~~~~
/Users/romanvg/dev/espressif/esp-idf/components/console/argtable3/argtable3.c: In function 'trex_compile':
/Users/romanvg/dev/espressif/esp-idf/components/console/argtable3/argtable3.c:3466:8: warning: variable 'exp' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
  TRex *exp = (TRex *)malloc(sizeof(TRex));
        ^~~
cc1: some warnings being treated as errors
make[1]: *** [argtable3/argtable3.o] Error 1
make: *** [component-console-build] Error 2

I'm trying to get this change included as a result of cleaning up for the following pull request:

https://github.com/espressif/esp-idf/pull/1163/files#diff-d5ecc885891c22ec8da78d6b54dc63b5L273

Let me know what you think about it, thanks!

/cc espressif/esp-idf#1163

@surreylabs surreylabs merged commit f2ce174 into argtable:master Nov 27, 2017
@surreylabs
Copy link
Collaborator

Hi @brainstorm, thanks for helping me fix this warning. I think rcsid is useless in the repository since we no longer use CVS. I totally agree with you to comment out the rcsid line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants