bugGNU indent - Bugs: bug #62326, variable 'paren_level' set but not...

 
 

bug #62326: variable 'paren_level' set but not used

Submitter:  Ryan Carsten Schmidt <ryandesign>
Submitted:  Sun 17 Apr 2022 12:54:21 PM 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
   

Sun 17 Apr 2022 12:54:21 PM UTC, original submission:  

In the file src/output.c in the function dump_line_code the variable paren_level is set but not otherwise used. This causes open source clang 13 and later to emit a warning "warning: variable 'paren_level' set but not used [-Wunused-but-set-variable]". Because GNU indent also enables -Werror, this warning is promoted to an error: "error: variable 'paren_level' set but not used [-Werror,-Wunused-but-set-variable]". Please remove the unused variable and ideally please do not build with -Werror by default since you never know what new warnings will appear in future compilers that will derail your users' builds of your software. If you wish to keep -Werror, perhaps you could add a configure option for those who want to turn it off.

This was originally reported to MacPorts here: https://trac.macports.org/ticket/65013

Ryan Carsten Schmidt <ryandesign>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53101:  no-Werror.patch added by ryandesign (488B - application/octet-stream)
file #53100:  paren_level.patch added by ryandesign (564B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ryandesign (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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-17 ryandesign Attached File- Added paren_level.patch, #53100
        Attached File- Added no-Werror.patch, #53101

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code