diff options
author | Sam James <sam@gentoo.org> | 2022-10-20 00:10:27 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-10-21 15:56:32 +0200 |
commit | f9e8e2c0ab73409862bb78a9285c1b72e0511750 (patch) | |
tree | 59b06fa0630a1fd27c39343c0bd8be2e42dabc57 /crypto/txt_db | |
parent | 71bc497dc321adeb08e7541556dea019c81c9a87 (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.c | 2 |
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] == '#')) |