Re: lots of unused variable warnings in assert-free builds
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter_e@gmx.net>, Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-01-24T17:12:56Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > Spraying the code with __attribute__((unused)) is somewhat undesirable > because it could mask a failure to properly initialize the variable in > an assert-enabled build. Ouch. Is it really true that __attribute__((unused)) disables detection of use of uninitialized variables? That would be nasty, and it's not obvious to me why it should need to work like that. But if it is true, then I agree that that makes this approach not too tenable. regards, tom lane