summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-08-14 16:21:50 +0900
committerMichael Paquier <michael@paquier.xyz>2025-08-14 16:21:50 +0900
commit6304256e79c70f6446e840023fbf1cbee47fb08e (patch)
treeda11c80a5787f82854972ea3de0d827bbc7b7ba1 /src
parente9a31c0cc604b015363d0aa5b018e8cea9d1d9a7 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/init/miscinit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c
index 65d8cbfaed5..545d1e90fbd 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -1099,7 +1099,8 @@ EstimateClientConnectionInfoSpace(void)
* Serialize MyClientConnectionInfo for use by parallel workers.
*/
void
-SerializeClientConnectionInfo(Size maxsize, char *start_address)
+SerializeClientConnectionInfo(Size maxsize PG_USED_FOR_ASSERTS_ONLY,
+ char *start_address)
{
SerializedClientConnectionInfo serialized = {0};