Skip to content

Commit dbfeb3d

Browse files
tglsfdcLeonid Borchuk
authored andcommitted
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 809abf0 commit dbfeb3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,6 @@ initialize_SSL(PGconn *conn)
797797
bool have_homedir;
798798
bool have_cert;
799799
bool have_rootcert;
800-
EVP_PKEY *pkey = NULL;
801800

802801
/*
803802
* We'll need the home directory if any of the relevant parameters are
@@ -1133,6 +1132,7 @@ initialize_SSL(PGconn *conn)
11331132
/* Colon, but not in second character, treat as engine:key */
11341133
char *engine_str = strdup(conn->sslkey);
11351134
char *engine_colon;
1135+
EVP_PKEY *pkey;
11361136

11371137
if (engine_str == NULL)
11381138
{

0 commit comments

Comments
 (0)