Re: Counter-productive UNUSED macro in connectivity/source/drivers/postgresql

2012-02-09 Thread Lubos Lunak
On Thursday 09 of February 2012, Michael Meeks wrote: > On Thu, 2012-02-09 at 09:20 +, Caolán McNamara wrote: > > Yeah, see commentary around SAL_UNUSED_PARAMETER in sal/inc/sal/types.h, > > can replace it with that if necessary. > > If we can choose - why do we add such over-long macros

Re: Counter-productive UNUSED macro in connectivity/source/drivers/postgresql

2012-02-09 Thread Michael Meeks
On Thu, 2012-02-09 at 09:20 +, Caolán McNamara wrote: > Yeah, see commentary around SAL_UNUSED_PARAMETER in sal/inc/sal/types.h, > can replace it with that if necessary. If we can choose - why do we add such over-long macros ? :-) Everyone is still suffering daily from:

Re: Counter-productive UNUSED macro in connectivity/source/drivers/postgresql

2012-02-09 Thread Caolán McNamara
On Thu, 2012-02-09 at 10:04 +0200, Tor Lillqvist wrote: > Sure, it silences warnings from gcc. But MSVC still warns. We do want > to eventually be warning-free with MSVC, too, don't we? Don't we > already have a convention how to handle unused parameters in C++ code, > i.e. comment their name out?

Counter-productive UNUSED macro in connectivity/source/drivers/postgresql

2012-02-09 Thread Tor Lillqvist
In pq_common.hxx there is: #ifdef UNUSED #elif defined(__GNUC__) # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) #elif defined(__LCLINT__) # define UNUSED(x) /*@unused@*/ x #else # define UNUSED(x) x #endif and then UNUSED is used like this (just in two places (so far, I guess the intent