aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-01-06 07:35:56 +0000
committerWerner Koch <[email protected]>2016-01-06 07:35:56 +0000
commite64317c15e9960f3173d374e589f7c3565a4ad08 (patch)
tree6fad48e5b0b1aa3076d222b772cd5c99f1a8b813
parenttests: Use info and error instead of a plain echo. (diff)
downloadgnupg-e64317c15e9960f3173d374e589f7c3565a4ad08.tar.gz
gnupg-e64317c15e9960f3173d374e589f7c3565a4ad08.zip
common: Avoid warnings about useless assignments.
* common/b64enc.c (b64enc_finish): Remove var assignment which is not used later. * common/iobuf.c (file_filter): Ditto. * common/tlv.c (do_find_tlv): Ditto. * common/userids.c (classify_user_id): Ditto. Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--common/b64enc.c2
-rw-r--r--common/iobuf.c1
-rw-r--r--common/tlv.c1
-rw-r--r--common/userids.c1
4 files changed, 0 insertions, 5 deletions
diff --git a/common/b64enc.c b/common/b64enc.c
index 087f27c9d..9101d9819 100644
--- a/common/b64enc.c
+++ b/common/b64enc.c
@@ -348,7 +348,6 @@ b64enc_finish (struct b64state *state)
{
for (idx=0; idx < 4; idx++)
es_putc (tmp[idx], state->stream);
- idx = 0;
if (es_ferror (state->stream))
goto write_error;
}
@@ -356,7 +355,6 @@ b64enc_finish (struct b64state *state)
{
for (idx=0; idx < 4; idx++)
putc (tmp[idx], state->fp);
- idx = 0;
if (ferror (state->fp))
goto write_error;
}
diff --git a/common/iobuf.c b/common/iobuf.c
index e8b4a034e..d149e2ebf 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -589,7 +589,6 @@ file_filter (void *opaque, int control, iobuf_t chain, byte * buf,
if (!a->keep_open)
fd_cache_close (a->no_cache ? NULL : a->fname, f);
}
- f = GNUPG_INVALID_FD;
xfree (a); /* We can free our context now. */
}
diff --git a/common/tlv.c b/common/tlv.c
index 74cb4a744..1a6c18f52 100644
--- a/common/tlv.c
+++ b/common/tlv.c
@@ -59,7 +59,6 @@ do_find_tlv (const unsigned char *buffer, size_t length,
for (;;)
{
- buffer = s;
if (n < 2)
return NULL; /* Buffer definitely too short for tag and length. */
if (!*s || *s == 0xff)
diff --git a/common/userids.c b/common/userids.c
index e094c69fa..b761d14b7 100644
--- a/common/userids.c
+++ b/common/userids.c
@@ -235,7 +235,6 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack)
desc->u.fpr[i] = hextobyte(si);
for (; i < 20; i++)
desc->u.fpr[i]= 0;
- s = se + 1;
mode = KEYDB_SEARCH_MODE_FPR;
}
break;