pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: er@xs4all.nl
To: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Try to fix compiler warnings.
Date: Fri, 12 Mar 2021 20:52:27 +0100 (CET)
Message-ID: <754180204.145028.1615578747289@webmailclassic.xs4all.nl> (raw)
In-Reply-To: <E1lKnZx-0005yZ-Mh@gemulon.postgresql.org>
References: <E1lKnZx-0005yZ-Mh@gemulon.postgresql.org>


> On 2021.03.12. 20:36 Robert Haas <rhaas@postgresql.org> wrote:
> 
>  
> Try to fix compiler warnings.
> 
> Per report from Peter Geoghegan.

I had the same errors Peter reported.  gcc 10.2 on debian.

The compile stops with:

In file included from ../../../src/include/postgres_fe.h:25,
                 from pg_amcheck.c:13:
pg_amcheck.c: In function ‘compile_relation_list_one_db’:
../../../src/include/c.h:118:31: error: expected ‘,’ or ‘;’ before ‘__attribute__’
  118 | #define pg_attribute_unused() __attribute__((unused))
      |                               ^~~~~~~~~~~~~
../../../src/include/c.h:155:34: note: in expansion of macro ‘pg_attribute_unused’
  155 | #define PG_USED_FOR_ASSERTS_ONLY pg_attribute_unused()
      |                                  ^~~~~~~~~~~~~~~~~~~
pg_amcheck.c:2061:26: note: in expansion of macro ‘PG_USED_FOR_ASSERTS_ONLY’
 2061 |   bool  is_btree = false PG_USED_FOR_ASSERTS_ONLY;
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~
pg_amcheck.c:2061:9: warning: variable ‘is_btree’ set but not used [-Wunused-but-set-variable]
 2061 |   bool  is_btree = false PG_USED_FOR_ASSERTS_ONLY;
      |         ^~~~~~~~
make[3]: *** [pg_amcheck.o] Error 1
make[2]: *** [all-pg_amcheck-recurse] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-bin-recurse] Error 2
make: *** [all-src-recurse] Error 2
../../../src/Makefile.global:919: recipe for target 'pg_amcheck.o' failed
Makefile:43: recipe for target 'all-pg_amcheck-recurse' failed
Makefile:42: recipe for target 'all-bin-recurse' failed
GNUmakefile:11: recipe for target 'all-src-recurse' failed


> 
> Discussion: http://postgr.es/m/CAH2-WznpwULZ3uJ1_6WXvNMXYbOy8k8tYs3r=qSdGmZeRd6tDw@mail.gmail.com
> 
> Branch
> ------
> master
> 
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/d60e61de4fb4a8e7ca88204c2c409e7380887d76
> 
> Modified Files
> --------------
> src/bin/pg_amcheck/pg_amcheck.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)





view thread (5+ messages)  latest in thread

Message-ID: <754180204.145028.1615578747289@webmailclassic.xs4all.nl>
Permalink:  ../754180204.145028.1615578747289@webmailclassic.xs4all.nl/
Also on:    postgresql.org/message-id/754180204.145028.1615578747289@webmailclassic.xs4all.nl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: er@xs4all.nl, rhaas@postgresql.org
  Subject: Re: pgsql: Try to fix compiler warnings.
  In-Reply-To: <754180204.145028.1615578747289@webmailclassic.xs4all.nl>
  References: <E1lKnZx-0005yZ-Mh@gemulon.postgresql.org> <754180204.145028.1615578747289@webmailclassic.xs4all.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox