bugGNU Gengen - Bugs: bug #56429, unused-parameter errors

 
 

bug #56429: unused-parameter errors

Submitter:  Gray Wolf <gray_wolf>
Submitted:  Mon 03 Jun 2019 11:59:54 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 03 Jun 2019 11:59:54 AM UTC, original submission:  

Gengen produces code that generates unsuded parameter warnings when compiled with -Wall -Wextra. Minimal reproduction example:


+   $ echo ';' | gengen --output-format=c > /tmp/test.c | gcc -Wall -Wextra -c -o /dev/null /tmp/test.c
/tmp/test.c: In function ‘generate_gengen’:
/tmp/test.c:41:57: warning: unused parameter ‘record’ [-Wunused-parameter]
 generate_gengen(FILE *stream, struct gengen_gen_struct *record, unsigned int indent)
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/tmp/test.c: In function ‘strcnt_gengen’:
/tmp/test.c:103:41: warning: unused parameter ‘record’ [-Wunused-parameter]
 strcnt_gengen(struct gengen_gen_struct *record, unsigned int indent)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/tmp/test.c:103:62: warning: unused parameter ‘indent’ [-Wunused-parameter]
 strcnt_gengen(struct gengen_gen_struct *record, unsigned int indent)
                                                 ~~~~~~~~~~~~~^~~~~~
/tmp/test.c: In function ‘init_gengen_gen_struct’:
/tmp/test.c:112:50: warning: unused parameter ‘record’ [-Wunused-parameter]
 init_gengen_gen_struct(struct gengen_gen_struct *record)
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~



Gray Wolf <gray_wolf>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gray_wolf (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code