Skip to content

Commit 6304256

Browse files
committed
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
1 parent e9a31c0 commit 6304256

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/utils/init/miscinit.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,8 @@ EstimateClientConnectionInfoSpace(void)
10991099
* Serialize MyClientConnectionInfo for use by parallel workers.
11001100
*/
11011101
void
1102-
SerializeClientConnectionInfo(Size maxsize, char *start_address)
1102+
SerializeClientConnectionInfo(Size maxsize PG_USED_FOR_ASSERTS_ONLY,
1103+
char *start_address)
11031104
{
11041105
SerializedClientConnectionInfo serialized = {0};
11051106

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy