Compile warnings in dbcommands.c building with meson - Mailing list pgsql-hackers

From Magnus Hagander
Subject Compile warnings in dbcommands.c building with meson
Date
Msg-id CABUevEyH2Fog5zvRzVQRH=JcJJH7oBkzcn_gw-h+kN5Q2t7-AA@mail.gmail.com
Whole thread Raw
Responses Re: Compile warnings in dbcommands.c building with meson
List pgsql-hackers
When building current head on debian bullseye I get this compile warning:

In file included from ../src/backend/commands/dbcommands.c:20:
../src/backend/commands/dbcommands.c: In function ‘createdb’:
../src/include/postgres.h:104:9: warning: ‘src_hasloginevt’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
  104 |  return (Datum) (X ? 1 : 0);
      |         ^~~~~~~~~~~~~~~~~~~
../src/backend/commands/dbcommands.c:683:8: note: ‘src_hasloginevt’
was declared here
  683 |  bool  src_hasloginevt;
      |        ^~~~~~~~~~~~~~~


I only get this when building with meson, not when building with
autotools. AFAICT, I have the same config:

./configure --enable-debug --enable-depend --with-python
--enable-cassert --with-openssl --enable-tap-tests --with-icu

vs

meson setup build -Ddebug=true -Dpython=true -Dcassert=true
-Dssl=openssl -Dtap-test=true -Dicu=enabled -Dnls=disabled


in both cases the compiler is:
gcc (Debian 10.2.1-6) 10.2.1 20210110

--
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Documentation to upgrade logical replication cluster
Next
From: Amit Kapila
Date:
Subject: Re: Documentation to upgrade logical replication cluster