bugGNU Gengetopt - Bugs: bug #40243, please fix...

 
 

bug #40243: please fix -Wunused-but-set-variable warnings in generated code

Submitted by:  Török Edwin <edwintorok>
Submitted on:  Fri 11 Oct 2013 04:28:39 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 11 Oct 2013 04:28:39 PM UTC, original submission:

Testcase:
$ cat >warningtest.ggo <<EOF
package "warningtest"
purpose "Should get not warnings with -Wall"
args "--unamed-opts --no-handle-version --strict-hidden"
usage "warningtest [OPTIONS]"

option "verbose" v "Enable verbose messages" flag off
EOF

$ gengetopt <warningtest.ggo && gcc -c cmdline.c -DVERSION=\"test\" -Wall
cmdline.c: In function ‘update_arg’:
cmdline.c:335:15: warning: variable ‘val’ set but not used [-Wunused-but-set-variable]
const char *val = value;
^
cmdline.c:334:9: warning: variable ‘stop_char’ set but not used [-Wunused-but-set-variable]
char *stop_char = 0;
^
cmdline.c: In function ‘cmdline_parser_internal’:
cmdline.c:408:7: warning: variable ‘check_required’ set but not used [-Wunused-but-set-variable]
int check_required;
^

Török Edwin <edwintorok>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by edwintorok (Submitted the item)
  • -unavailable- added by edwintorok
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 11 Oct 2013 04:28:39 PM UTCedwintorokCarbon-Copy-=>Added edwintorok

    Back to the top


    Powered by Savane 3.1-cleanup