bugGPSD - Bugs: bug #44566, Unused variable warnings with...

 
 

bug #44566: Unused variable warnings with -DNDEBUG

Submitter:  Kurt Schwehr <schwehr>
Submitted:  Wed 18 Mar 2015 01:41:42 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  esr
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 18 Mar 2015 12:52:33 PM UTC, comment #2: 
Kurt Schwehr <schwehr>
Wed 18 Mar 2015 02:12:09 AM UTC, comment #1: 

Weird that referencing the variable in assert doesn't count as used.

Patch applied, thanks.

Eric S. Raymond <esr>
Group administrator
Wed 18 Mar 2015 01:41:42 AM UTC, original submission:  

With -Werror -DNDEBUG, these two cases end up failing with unused variables (gcc 4.9 with lots of patches on Linux).  The attached patch solves the issue for me, but it's possible that it might be better with the UNUSEDs wrapped in #ifdef NDEBUG.

Kurt Schwehr <schwehr>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33387:  gpsd.diff added by schwehr (785B - 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 esr (Posted a comment)
  • -email is unavailable- added by schwehr (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-03 esr Open/ClosedOpen Closed
    2015-03-18 esr StatusNone Fixed
        Assigned toNone esr
    2015-03-18 schwehr Attached File- Added gpsd.diff, #33387

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code