Skip to content

Commit 3622c80

Browse files
committed
Avoid "unused variable" warning on non-USE_SSL_ENGINE platforms.
If we are building with openssl but USE_SSL_ENGINE didn't get set, initialize_SSL's variable "pkey" is declared but used nowhere. Apparently this combination hasn't been exercised in the buildfarm before now, because I've not seen this warning before, even though the code has been like this a long time. Move the declaration to silence the warning (and remove its useless initialization). Per buildfarm member sawshark. Back-patch to all supported branches.
1 parent 3d0f730 commit 3622c80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interfaces/libpq/fe-secure-openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,6 @@ initialize_SSL(PGconn *conn)
902902
bool have_homedir;
903903
bool have_cert;
904904
bool have_rootcert;
905-
EVP_PKEY *pkey = NULL;
906905

907906
/*
908907
* We'll need the home directory if any of the relevant parameters are
@@ -1252,6 +1251,7 @@ initialize_SSL(PGconn *conn)
12521251
/* Colon, but not in second character, treat as engine:key */
12531252
char *engine_str = strdup(conn->sslkey);
12541253
char *engine_colon;
1254+
EVP_PKEY *pkey;
12551255

12561256
if (engine_str == NULL)
12571257
{

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