Re: warning in code while building on windows - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: warning in code while building on windows
Date
Msg-id 52113CF5.2030201@dunslane.net
Whole thread Raw
In response to Re: warning in code while building on windows  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: warning in code while building on windows  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: warning in code while building on windows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 08/18/2013 05:08 PM, Alvaro Herrera wrote:
> Amit Kapila escribió:
>> 1>.\src\backend\utils\cache\relfilenodemap.c(213) : warning C4101:
>> 'isnull' : unreferenced local variable
>>
>> It seems this variable is used only under macro USE_ASSERT_CHECKING,
>> so it is better to declare under this macro only.
> We have a macro for this, PG_USED_FOR_ASSERTS_ONLY.  This should silence
> it; if the msvc stuff is not picking it up then maybe we need to tweak
> the definition of the macro somehow.
>


The macro is pretty gcc-specific, isn't it?

For MSVC we would probably need to surround the declaration with
something like these lines.
   #pragma warning(disable:4101)   #pragma warning(default:4101)

cheers

andrew



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Materialized views WIP patch
Next
From: Hannu Krosing
Date:
Subject: Re: Feature Request on Extensions