Re: BRIN indexes - TRAP: BadArgument - Mailing list pgsql-hackers

From David Rowley
Subject Re: BRIN indexes - TRAP: BadArgument
Date
Msg-id CAApHDvpGxp6C9xGh51L6z-c+AuXZpvJw+Z5nfem_5=bYK8Cdog@mail.gmail.com
Whole thread Raw
In response to Re: BRIN indexes - TRAP: BadArgument  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Sat, Nov 8, 2014 at 8:56 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

I just pushed this, after some more minor tweaks.  Thanks, and please do
continue testing!


Here's another small fix for some unused variable warnings. Unfortunately this Microsoft compiler that I'm using does not know about __attribute__((unused)), so some warnings are generated for these:

BrinTuple  *tmptup PG_USED_FOR_ASSERTS_ONLY;
BrinMemTuple *tmpdtup PG_USED_FOR_ASSERTS_ONLY;
Size tmpsiz PG_USED_FOR_ASSERTS_ONLY; 

The attached patch moves these into within the #ifdef USE_ASSERT_CHECKING section.

I know someone will ask so, let me explain: The reason I don't see a bunch of other warnings for PG_USED_FOR_ASSERTS_ONLY vars when compiling without assert checks, is that this Microsoft compiler seems to be ok with variables being assigned values and the values never being used, but if the variable is never assigned a value, then it'll warn you of that.

Regards

David Rowley
 
Attachment

pgsql-hackers by date:

Previous
From: mariem
Date:
Subject: Re: Convert query plan to sql query
Next
From: David Rowley
Date:
Subject: Re: BRIN indexes - TRAP: BadArgument