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 <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
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(-)

Reply via email to