Compile warnings in dbcommands.c building with meson

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Compile warnings in dbcommands.c building with meson
Date: 2024-01-10 10:33:39
Message-ID: CABUevEyH2Fog5zvRzVQRH=JcJJH7oBkzcn_gw-h+kN5Q2t7-AA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-01-10 10:33:41 Re: Documentation to upgrade logical replication cluster
Previous Message Amit Kapila 2024-01-10 10:20:33 Re: Documentation to upgrade logical replication cluster