pgsql: Fix compilation warning with SerializeClientConnectionInfo() - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Fix compilation warning with SerializeClientConnectionInfo()
Date
Msg-id E1umSI3-000UDF-0t@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/791506f59e48906477140aa0b80b91f91e8ed601

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


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix compilation warning with SerializeClientConnectionInfo()
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix LSN format in debug message