diff options
| author | Peter Eisentraut | 2026-09-11 17:12:43 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2026-09-11 17:24:47 +0000 |
| commit | fbaeb88978f023e724bef1ce74fc46c65841401c (patch) | |
| tree | 41de553d57fd27c252bfb3fb17e961ea90a65ed2 /src | |
| parent | e8601cb3d48de06e642683e91ef21f528e2ab462 (diff) | |
pg_ctl: Silence warnings about unused global variables
Several global variables are only used in Windows build. This causes
-Wunused-but-set-global warnings that the new clang 23 enables via
-Wall.
This commit marks these with an unused attribute to silence the
warnings.
(In the master branch, this is addressed differently, but for
backpatching, this just silences the warnings without any behavior
change.)
Reviewed-by: Andreas Karlsson <andreas@proxel.se>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/eb013f9d-2247-444e-8815-9d17b4ce78e7%40eisentraut.org
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index b5433a75d12..271d545da59 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -75,7 +75,7 @@ StaticAssertDecl(USECS_PER_SEC % WAITS_PER_SEC == 0, static bool do_wait = true; static int wait_seconds = DEFAULT_WAIT; -static bool wait_seconds_arg = false; +pg_attribute_unused() static bool wait_seconds_arg = false; static bool silent_mode = false; static ShutdownMode shutdown_mode = FAST_MODE; static int sig = SIGINT; /* default */ @@ -87,10 +87,10 @@ static char *post_opts = NULL; static const char *progname; static char *log_file = NULL; static char *exec_path = NULL; -static char *event_source = NULL; -static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */ -static char *register_username = NULL; -static char *register_password = NULL; +pg_attribute_unused() static char *event_source = NULL; +pg_attribute_unused() static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */ +pg_attribute_unused() static char *register_username = NULL; +pg_attribute_unused() static char *register_password = NULL; static char *argv0 = NULL; static bool allow_core_files = false; static time_t start_time; |
