diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 3c034c8a6c7..82a7ada7baa 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -227,7 +227,7 @@ static pgsocket ListenSocket[MAXLISTEN]; * the postmaster stop (rather than kill) peers and not reinitialize * shared data structures. (Reinit is currently dead code, though.) */ -static bool Reinit = true; +pg_attribute_unused() static bool Reinit = true; static int SendStop = false; /* still more option variables */ diff --git a/src/backend/utils/adt/jsonpath_scan.l b/src/backend/utils/adt/jsonpath_scan.l index 72d4c5e946a..f2c20639885 100644 --- a/src/backend/utils/adt/jsonpath_scan.l +++ b/src/backend/utils/adt/jsonpath_scan.l @@ -25,7 +25,6 @@ static JsonPathString scanstring; /* Handles to the buffer that the lexer uses internally */ static YY_BUFFER_STATE scanbufhandle; static char *scanbuf; -static int scanbuflen; static void addstring(bool init, char *s, int l); static void addchar(bool init, char s); @@ -393,7 +392,6 @@ jsonpath_scanner_init(const char *str, int slen) * Make a scan buffer with special termination needed by flex. */ - scanbuflen = slen; scanbuf = palloc(slen + 2); memcpy(scanbuf, str, slen); scanbuf[slen] = scanbuf[slen + 1] = YY_END_OF_BUFFER_CHAR; diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c index 998412783b0..0586cdb6d9d 100644 --- a/src/bin/pg_dump/pg_dump_sort.c +++ b/src/bin/pg_dump/pg_dump_sort.c @@ -150,7 +150,6 @@ static const int dbObjectTypePriority[] = StaticAssertDecl(lengthof(dbObjectTypePriority) == (DO_SUBSCRIPTION + 1), "array length mismatch"); -static DumpId preDataBoundId; static DumpId postDataBoundId; @@ -540,7 +539,6 @@ sortDumpableObjects(DumpableObject **objs, int numObjs, * Saving the boundary IDs in static variables is a bit grotty, but seems * better than adding them to parameter lists of subsidiary functions. */ - preDataBoundId = preBoundaryId; postDataBoundId = postBoundaryId; ordering = (DumpableObject **) pg_malloc(numObjs * sizeof(DumpableObject *)); diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index 48cec07cefb..a15069cbf6c 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -81,7 +81,9 @@ static int my_SSL_set_fd(PGconn *conn, int fd); static bool pq_init_ssl_lib = true; +#ifdef HAVE_CRYPTO_LOCK static bool pq_init_crypto_lib = true; +#endif static bool ssl_lib_initialized = false; @@ -112,7 +114,9 @@ pgtls_init_library(bool do_ssl, int do_crypto) #endif pq_init_ssl_lib = do_ssl; +#ifdef HAVE_CRYPTO_LOCK pq_init_crypto_lib = do_crypto; +#endif } PostgresPollingStatusType