Re: lots of unused variable warnings in assert-free builds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lots of unused variable warnings in assert-free builds
Date: 2012-01-24 17:12:56
Message-ID: 8043.1327425176@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-01-24 17:25:09 Re: lots of unused variable warnings in assert-free builds
Previous Message Robert Haas 2012-01-24 16:52:33 Re: lots of unused variable warnings in assert-free builds