agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Remove unused global variables 7+ messages / 1 participants [nested] [flat]
* pgsql: Remove unused global variables @ 2026-09-11 16:00 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 7+ messages in thread From: Peter Eisentraut @ 2026-09-11 16:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove unused global variables The new clang 23 has a new warning about set-but-unused static (internal-linkage) global variables: -Wunused-but-set-global, which is activated in PostgreSQL builds via -Wall. This triggers a few warnings in PostgreSQL code. This commit removes several such variables that were either never used or whose last use was removed some time ago. 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4e108ce790ec68c6721d08c307109e660bfc0cf3 Modified Files -------------- src/backend/access/transam/xlog.c | 10 ---------- src/backend/postmaster/postmaster.c | 3 --- src/bin/pg_dump/pg_dump_sort.c | 2 -- src/test/modules/test_resowner/test_resowner_many.c | 6 +----- 4 files changed, 1 insertion(+), 20 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove unused global variables @ 2026-09-11 17:25 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 7+ messages in thread From: Peter Eisentraut @ 2026-09-11 17:25 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove unused global variables The new clang 23 has a new warning about set-but-unused static (internal-linkage) global variables: -Wunused-but-set-global, which is activated in PostgreSQL builds via -Wall. This triggers a few warnings in PostgreSQL code. This commit removes several such variables that were either never used or whose last use was removed some time ago. 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 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e8601cb3d48de06e642683e91ef21f528e2ab462 Modified Files -------------- src/backend/access/transam/xlog.c | 10 ---------- src/backend/postmaster/postmaster.c | 3 --- src/bin/pg_dump/pg_dump_sort.c | 2 -- src/test/modules/test_resowner/test_resowner_many.c | 6 +----- 4 files changed, 1 insertion(+), 20 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove unused global variables @ 2026-09-11 17:36 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 7+ messages in thread From: Peter Eisentraut @ 2026-09-11 17:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove unused global variables The new clang 23 has a new warning about set-but-unused static (internal-linkage) global variables: -Wunused-but-set-global, which is activated in PostgreSQL builds via -Wall. This triggers a few warnings in PostgreSQL code. This commit removes several such variables that were either never used or whose last use was removed some time ago. 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 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5e6c1448deff8ac198d7b4803cc537985872410c Modified Files -------------- src/backend/access/transam/xlog.c | 9 --------- src/backend/postmaster/postmaster.c | 3 --- src/bin/pg_dump/pg_dump_sort.c | 2 -- src/test/modules/test_resowner/test_resowner_many.c | 6 +----- 4 files changed, 1 insertion(+), 19 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove unused global variables @ 2026-09-11 18:01 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 7+ messages in thread From: Peter Eisentraut @ 2026-09-11 18:01 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove unused global variables The new clang 23 has a new warning about set-but-unused static (internal-linkage) global variables: -Wunused-but-set-global, which is activated in PostgreSQL builds via -Wall. This triggers a few warnings in PostgreSQL code. This commit removes several such variables that were either never used or whose last use was removed some time ago. For pq_init_crypto_lib, we apply the same #ifdef HAVE_CRYPTO_LOCK that the other uses of the variable already have, so that the variable is either fully used or fully nonexistent, depending on the configuration, not half-way. 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 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/be1f3b20cbce8e0f60a32054f54cd2498ee21fcf Modified Files -------------- src/backend/access/transam/xlog.c | 9 --------- src/backend/postmaster/postmaster.c | 3 --- src/backend/utils/adt/jsonpath_scan.l | 2 -- src/bin/pg_dump/pg_dump_sort.c | 2 -- src/interfaces/libpq/fe-secure-openssl.c | 4 ++++ src/test/modules/test_resowner/test_resowner_many.c | 6 +----- 6 files changed, 5 insertions(+), 21 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove unused global variables @ 2026-09-11 18:55 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 7+ messages in thread From: Peter Eisentraut @ 2026-09-11 18:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove unused global variables The new clang 23 has a new warning about set-but-unused static (internal-linkage) global variables: -Wunused-but-set-global, which is activated in PostgreSQL builds via -Wall. This triggers a few warnings in PostgreSQL code. This commit removes several such variables that were either never used or whose last use was removed some time ago. For pq_init_crypto_lib, we apply the same #ifdef HAVE_CRYPTO_LOCK that the other uses of the variable already have, so that the variable is either fully used or fully nonexistent, depending on the configuration, not half-way. 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 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/889df21e6377cb47ad1f37bc04159388cfce5163 Modified Files -------------- src/backend/access/transam/xlog.c | 9 --------- src/backend/postmaster/postmaster.c | 3 --- src/backend/utils/adt/jsonpath_scan.l | 2 -- src/bin/pg_dump/pg_dump_sort.c | 2 -- src/interfaces/libpq/fe-secure-openssl.c | 4 ++++ 5 files changed, 4 insertions(+), 16 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove unused global variables @ 2026-09-11 19:09 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 7+ messages in thread From: Peter Eisentraut @ 2026-09-11 19:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove unused global variables The new clang 23 has a new warning about set-but-unused static (internal-linkage) global variables: -Wunused-but-set-global, which is activated in PostgreSQL builds via -Wall. This triggers a few warnings in PostgreSQL code. This commit removes several such variables that were either never used or whose last use was removed some time ago. For pq_init_crypto_lib, we apply the same #ifdef HAVE_CRYPTO_LOCK that the other uses of the variable already have, so that the variable is either fully used or fully nonexistent, depending on the configuration, not half-way. Reinit was already documented in a comment as dead code, and it was removed in a later branch. To minimize the surgery there, just add an unused attribute to silence the warning. 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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d61f79b747c5cc351c8129f33ea28dc16f3660ec Modified Files -------------- src/backend/access/transam/xlog.c | 9 --------- src/backend/postmaster/postmaster.c | 5 +---- src/backend/utils/adt/jsonpath_scan.l | 2 -- src/bin/pg_dump/pg_dump_sort.c | 2 -- src/interfaces/libpq/fe-secure-openssl.c | 4 ++++ 5 files changed, 5 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Remove unused global variables @ 2026-09-11 19:33 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 7+ messages in thread From: Peter Eisentraut @ 2026-09-11 19:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Remove unused global variables The new clang 23 has a new warning about set-but-unused static (internal-linkage) global variables: -Wunused-but-set-global, which is activated in PostgreSQL builds via -Wall. This triggers a few warnings in PostgreSQL code. This commit removes several such variables that were either never used or whose last use was removed some time ago. For pq_init_crypto_lib, we apply the same #ifdef HAVE_CRYPTO_LOCK that the other uses of the variable already have, so that the variable is either fully used or fully nonexistent, depending on the configuration, not half-way. Reinit was already documented in a comment as dead code, and it was removed in a later branch. To minimize the surgery there, just add an unused attribute to silence the warning. 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4096767a94b039aebcc84e347ea1744374a6f6eb Modified Files -------------- src/backend/postmaster/postmaster.c | 2 +- src/backend/utils/adt/jsonpath_scan.l | 2 -- src/bin/pg_dump/pg_dump_sort.c | 2 -- src/interfaces/libpq/fe-secure-openssl.c | 4 ++++ 4 files changed, 5 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2026-09-11 19:33 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-09-11 16:00 pgsql: Remove unused global variables Peter Eisentraut <peter@eisentraut.org> 2026-09-11 17:25 pgsql: Remove unused global variables Peter Eisentraut <peter@eisentraut.org> 2026-09-11 17:36 pgsql: Remove unused global variables Peter Eisentraut <peter@eisentraut.org> 2026-09-11 18:01 pgsql: Remove unused global variables Peter Eisentraut <peter@eisentraut.org> 2026-09-11 18:55 pgsql: Remove unused global variables Peter Eisentraut <peter@eisentraut.org> 2026-09-11 19:09 pgsql: Remove unused global variables Peter Eisentraut <peter@eisentraut.org> 2026-09-11 19:33 pgsql: Remove unused global variables Peter Eisentraut <peter@eisentraut.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox