]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix compilation warning with SerializeClientConnectionInfo()
authorMichael Paquier <michael@paquier.xyz>
Thu, 14 Aug 2025 07:22:00 +0000 (16:22 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 14 Aug 2025 07:22:00 +0000 (16:22 +0900)
commit3e6741e8dd5b585e85b5d9371453ff80aa1f0c04
tree6d7f6c0aa2fd80629ef0d8bbed51da56c73743d4
parent3e6059cc70c016d2d15a66d3cabadc4d889c3831
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
src/backend/utils/init/miscinit.c