lots of unused variable warnings in assert-free builds - Mailing list pgsql-hackers

From Peter Eisentraut
Subject lots of unused variable warnings in assert-free builds
Date
Msg-id 1326577998.31492.19.camel@vanquo.pezone.net
Whole thread Raw
Responses Re: lots of unused variable warnings in assert-free builds  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
In builds without --enable-cassert (I guess not many developers use
those a lot), there are quite a few unused variable warnings.  These
usually hold some intermediate result that the assert checks later.  I
see that in some places our code already uses #ifdef
USE_ASSERT_CHECKING, presumably to hide similar issues.  But in most
cases using this would significantly butcher the code.  I found that
adding __attribute__((unused)) is cleaner.  Attached is a patch that
cleans up all the warnings I encountered.

Attachment

pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Command Triggers
Next
From: Peter Eisentraut
Date:
Subject: Re: separate initdb -A options for local and host