Commit 60ced074 authored by Cristian Stoica's avatar Cristian Stoica Committed by Richard Levitte
Browse files

fix warning unused-but-set-variable 'alg_k' (no-dh and no-ec)



This patch fixes the following warning when OpenSSL is configured with
no-dh and no-ec:

./Configure no-ec no-dh linux-x86_64

...
s3_lib.c: In function 'ssl3_get_req_cert_type':
s3_lib.c:4234:19: warning: variable 'alg_k' set but not used [-Wunused-but-set-variable]
     unsigned long alg_k;

CLA: trivial
Signed-off-by: default avatarCristian Stoica <cristian.stoica@nxp.com>

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6087)
parent 76b8b693
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4231,7 +4231,10 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p)
#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ECDH)
    int nostrict = 1;
#endif
#if !defined(OPENSSL_NO_GOST) || !defined(OPENSSL_NO_DH) || \
    !defined(OPENSSL_NO_ECDH)
    unsigned long alg_k;
#endif

    /* If we have custom certificate types set, use them */
    if (s->cert->ctypes) {
@@ -4261,7 +4264,10 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p)
        }
    }

#if !defined(OPENSSL_NO_GOST) || !defined(OPENSSL_NO_DH) || \
    !defined(OPENSSL_NO_ECDH)
    alg_k = s->s3->tmp.new_cipher->algorithm_mkey;
#endif

#ifndef OPENSSL_NO_GOST
    if (s->version >= TLS1_VERSION) {