summaryrefslogtreecommitdiffstats
path: root/crypto/txt_db
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-20 00:10:27 +0100
committerTomas Mraz <tomas@openssl.org>2022-10-21 15:56:32 +0200
commitf9e8e2c0ab73409862bb78a9285c1b72e0511750 (patch)
tree59b06fa0630a1fd27c39343c0bd8be2e42dabc57 /crypto/txt_db
parent71bc497dc321adeb08e7541556dea019c81c9a87 (diff)
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)
Diffstat (limited to 'crypto/txt_db')
-rw-r--r--crypto/txt_db/txt_db.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/crypto/txt_db/txt_db.c b/crypto/txt_db/txt_db.c
index 6744c03531..4410e35ee1 100644
--- a/crypto/txt_db/txt_db.c
+++ b/crypto/txt_db/txt_db.c
@@ -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] == '#'))