mirror of
https://github.com/openssl/openssl.git
synced 2024-11-23 18:13:39 +08:00
txt_db: fix -Wunused-but-set-variable
The loop never uses the value of 'ln'. Fixes this error with Clang 15: ``` crypto/txt_db/txt_db.c:24:10: error: variable 'ln' set but not used [-Werror,-Wunused-but-set-variable] long ln = 0; ^ 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
71bc497dc3
commit
f9e8e2c0ab
@ -21,7 +21,6 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
|
||||
{
|
||||
TXT_DB *ret = NULL;
|
||||
int esc = 0;
|
||||
long ln = 0;
|
||||
int i, add, n;
|
||||
int size = BUFSIZE;
|
||||
int offset = 0;
|
||||
@ -61,7 +60,6 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
|
||||
}
|
||||
buf->data[offset] = '\0';
|
||||
BIO_gets(in, &(buf->data[offset]), size - offset);
|
||||
ln++;
|
||||
if (buf->data[offset] == '\0')
|
||||
break;
|
||||
if ((offset == 0) && (buf->data[0] == '#'))
|
||||
|
Loading…
Reference in New Issue
Block a user