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

Commit 8f8511d

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 30fe8a7 commit 8f8511d

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
@@ -775,7 +775,6 @@ initialize_SSL(PGconn *conn)
775775
bool have_homedir;
776776
bool have_cert;
777777
bool have_rootcert;
778-
EVP_PKEY *pkey = NULL;
779778

780779
/*
781780
* We'll need the home directory if any of the relevant parameters are
@@ -1009,6 +1008,7 @@ initialize_SSL(PGconn *conn)
10091008
/* Colon, but not in second character, treat as engine:key */
10101009
char *engine_str = strdup(conn->sslkey);
10111010
char *engine_colon;
1011+
EVP_PKEY *pkey;
10121012

10131013
if (engine_str == NULL)
10141014
{

0 commit comments

Comments
 (0)