pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix compilation warning with SerializeClientConnectionInfo()
Date: Thu, 14 Aug 2025 07:22:22 +0000
Message-ID: <E1umSI3-000UD9-0k@gemulon.postgresql.org> (raw)

Fix compilation warning with SerializeClientConnectionInfo()

This function uses an argument named "maxsize" that is only used in
assertions, being set once outside the assertion area.  Recent gcc
versions with -Wunused-but-set-parameter complain about a warning when
building without assertions enabled, because of that.

In order to fix this issue, PG_USED_FOR_ASSERTS_ONLY is added to the
function argument of SerializeClientConnectionInfo(), which is the first
time we are doing so in the tree.  The CI is fine with the change, but
let's see what the buildfarm has to say on the matter.

Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Jacob Champion <jchampion@postgresql.org>
Discussion: https://postgr.es/m/pevajesswhxafjkivoq3yvwxga77tbncghlf3gq5fvchsvfuda@6uivg25sb3nx
Backpatch-through: 16

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6304256e79c70f6446e840023fbf1cbee47fb08e

Modified Files
--------------
src/backend/utils/init/miscinit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1umSI3-000UD9-0k@gemulon.postgresql.org>
Permalink:  ../E1umSI3-000UD9-0k@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1umSI3-000UD9-0k@gemulon.postgresql.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix compilation warning with SerializeClientConnectionInfo()
  In-Reply-To: <E1umSI3-000UD9-0k@gemulon.postgresql.org>

* 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