mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
x509: fix -Wunused-but-set-variable
The value of 'l' isn't ever actually used. Fixes this error with Clang 15: ``` crypto/x509/x_name.c:506:9: error: variable 'l' set but not used [-Werror,-Wunused-but-set-variable] int l, i; ^ 1 error generated. ``` Signed-off-by: Sam James <sam@gentoo.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19450)
This commit is contained in:
parent
f9e8e2c0ab
commit
c713186685
@ -503,9 +503,7 @@ int X509_NAME_set(X509_NAME **xn, const X509_NAME *name)
|
||||
int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)
|
||||
{
|
||||
char *s, *c, *b;
|
||||
int l, i;
|
||||
|
||||
l = 80 - 2 - obase;
|
||||
int i;
|
||||
|
||||
b = X509_NAME_oneline(name, NULL, 0);
|
||||
if (b == NULL)
|
||||
@ -531,12 +529,10 @@ int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase)
|
||||
if (BIO_write(bp, ", ", 2) != 2)
|
||||
goto err;
|
||||
}
|
||||
l--;
|
||||
}
|
||||
if (*s == '\0')
|
||||
break;
|
||||
s++;
|
||||
l--;
|
||||
}
|
||||
|
||||
OPENSSL_free(b);
|
||||
|
Loading…
Reference in New Issue
Block a user