From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Don't initialize page in {vm,fsm}_extend(), not needed
Date: Wed, 5 Apr 2023 16:58:41 -0700
Message-ID: <20230405235841.6lqaxjkndh2qlmii@awork3.anarazel.de> (raw)
In-Reply-To: <2194723.1680736788@sss.pgh.pa.us>
References: <E1pk5tJ-001W2q-Bq@gemulon.postgresql.org>
<2194723.1680736788@sss.pgh.pa.us>
Hi,
On 2023-04-05 19:19:48 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Don't initialize page in {vm,fsm}_extend(), not needed
>
> Various buildfarm members are complaining about under-braced
> initializations added by this commit.
>
> visibilitymap.c: In function \342\200\230vm_extend\342\200\231:
> visibilitymap.c:625:2: warning: missing braces around initializer [-Wmissing-braces]
> PGAlignedBlock pg = {0};
> ^
> visibilitymap.c:625:2: warning: (near initialization for \342\200\230pg.data\342\200\231) [-Wmissing-braces]
>
> freespace.c: In function \342\200\230fsm_extend\342\200\231:
> freespace.c:611:2: warning: missing braces around initializer [-Wmissing-braces]
> PGAlignedBlock pg = {0};
> ^
> freespace.c:611:2: warning: (near initialization for \342\200\230pg.data\342\200\231) [-Wmissing-braces]
>
> This is from buri, similar from curculio, dragonet, idiacanthus,
> xenodermus, etc
I really don't see the point of placating old compilers for things like
this. It's just inflicting pain on ourselves without any reward. Just to be
clear: I didn't knowingly trigger the warning.
Either way, an upcoming commit will implement vm_extend() / fsm_extend() with
generic code, then the warning will be gone.
Greetings,
Andres Freund
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Don't initialize page in {vm,fsm}_extend(), not needed
In-Reply-To: <20230405235841.6lqaxjkndh2qlmii@awork3.anarazel.de>
* 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