Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3235a11

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 14e4e8f commit 3235a11

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
@@ -915,7 +915,6 @@ initialize_SSL(PGconn *conn)
915915
bool have_homedir;
916916
bool have_cert;
917917
bool have_rootcert;
918-
EVP_PKEY *pkey = NULL;
919918

920919
/*
921920
* We'll need the home directory if any of the relevant parameters are
@@ -1265,6 +1264,7 @@ initialize_SSL(PGconn *conn)
12651264
/* Colon, but not in second character, treat as engine:key */
12661265
char *engine_str = strdup(conn->sslkey);
12671266
char *engine_colon;
1267+
EVP_PKEY *pkey;
12681268

12691269
if (engine_str == NULL)
12701270
{

0 commit comments

Comments
 (0)