Lists: | pgsql-hackers |
---|
From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Subject: | Compiler warning in master branch |
Date: | 2014-11-10 03:31:08 |
Message-ID: | CAM3SWZRUaCeCBFEU0JuEpyhLR_gFDswUQps-XLk3hvm_C-rY6g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
I see this when I build at -O2 from master's tip:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -Werror -I../../../../src/include
-D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o
brin_revmap.o brin_revmap.c -MMD -MP -MF .deps/brin_revmap.Po
brin_revmap.c: In function ‘brinRevmapExtend’:
brin_revmap.c:113:14: error: variable ‘mapBlk’ set but not used
[-Werror=unused-but-set-variable]
BlockNumber mapBlk;
^
I'm using gcc 4.8.2 here.
--
Peter Geoghegan
From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Subject: | Re: Compiler warning in master branch |
Date: | 2014-11-10 07:29:58 |
Message-ID: | CAApHDvrQcjRjUChEycp2BOv+xtJ8innEMGWoAgaqnkeeAtGVRQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Nov 10, 2014 at 4:31 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> I see this when I build at -O2 from master's tip:
>
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels
> -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
> -fwrapv -fexcess-precision=standard -Werror -I../../../../src/include
> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o
> brin_revmap.o brin_revmap.c -MMD -MP -MF .deps/brin_revmap.Po
> brin_revmap.c: In function ‘brinRevmapExtend’:
> brin_revmap.c:113:14: error: variable ‘mapBlk’ set but not used
> [-Werror=unused-but-set-variable]
> BlockNumber mapBlk;
> ^
>
> I'm using gcc 4.8.2 here.
>
>
It would appear just to need the attached.
Regards
David Rowley
Attachment | Content-Type | Size |
---|---|---|
brin_used_for_asserts_only_fix.diff | text/plain | 467 bytes |
From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Subject: | Re: Compiler warning in master branch |
Date: | 2014-11-10 15:48:16 |
Message-ID: | 1415634496.37896.YahooMailNeo@web122303.mail.ne1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
David Rowley <dgrowleyml(at)gmail(dot)com> wrote:> On Mon, Nov 10, 2014 at 4:31 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
>> I see this when I build at -O2 from master's tip:
>> brin_revmap.c: In function ‘brinRevmapExtend’:
>> brin_revmap.c:113:14: error: variable ‘mapBlk’ set but not used
>> [-Werror=unused-but-set-variable]
>> BlockNumber mapBlk;
>> ^
> It would appear just to need the attached.
Confirmed and pushed.
Thanks to both of you!
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company