summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-11-15 09:23:40 +0100
committerWerner Koch <wk@gnupg.org>2013-11-15 15:49:34 +0100
commita0102a548d0e2ed2fce74ba4a21adf26bc352641 (patch)
treec41e31e39f8c57fecc6dedeafb35b59a541d80d8
parentgpg: Rework ECC support and add experimental support for Ed25519. (diff)
downloadgnupg2-a0102a548d0e2ed2fce74ba4a21adf26bc352641.tar.xz
gnupg2-a0102a548d0e2ed2fce74ba4a21adf26bc352641.zip
Fix minor compiler warnings.
--
-rw-r--r--g10/build-packet.c2
-rw-r--r--g10/kbnode.c1
-rw-r--r--g10/parse-packet.c2
-rwxr-xr-xtests/openpgp/ecc.test2
-rwxr-xr-xtests/openpgp/import.test8
5 files changed, 4 insertions, 11 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index 6681b3429..b4514aebb 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -331,7 +331,7 @@ do_key (iobuf_t out, int ctb, PKT_public_key *pk)
for (i=0; i < npkey; i++ )
{
if ((pk->pubkey_algo == PUBKEY_ALGO_ECDSA && (i == 0))
- || (pk->pubkey_algo == PUBKEY_ALGO_ECDH) && (i == 0 || i == 2))
+ || ((pk->pubkey_algo == PUBKEY_ALGO_ECDH) && (i == 0 || i == 2)))
err = gpg_mpi_write_nohdr (a, pk->pkey[i]);
else
err = gpg_mpi_write (a, pk->pkey[i]);
diff --git a/g10/kbnode.c b/g10/kbnode.c
index d4907408b..ad66f8a99 100644
--- a/g10/kbnode.c
+++ b/g10/kbnode.c
@@ -26,6 +26,7 @@
#include "gpg.h"
#include "util.h"
+#include "../common/init.h"
#include "packet.h"
#include "keydb.h"
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 3b2698fcb..f4390c38a 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -1991,7 +1991,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
for (i = 0; i < npkey; i++)
{
if ((algorithm == PUBKEY_ALGO_ECDSA && (i == 0))
- || (algorithm == PUBKEY_ALGO_ECDH) && (i == 0 || i == 2))
+ || ((algorithm == PUBKEY_ALGO_ECDH) && (i == 0 || i == 2)))
{
size_t n;
err = read_size_body (inp, pktlen, &n, pk->pkey+i);
diff --git a/tests/openpgp/ecc.test b/tests/openpgp/ecc.test
index 6e3ae8191..01e1e0617 100755
--- a/tests/openpgp/ecc.test
+++ b/tests/openpgp/ecc.test
@@ -20,7 +20,7 @@ mainkeyids='BAA59D9C
45AF2FFE'
-if have_pubkey_algo "ECDH"; then
+if have_pubkey_algo "ECC"; then
:
else
info "No ECC support due to an old Libgcrypt"
diff --git a/tests/openpgp/import.test b/tests/openpgp/import.test
index f9fe9907a..eb6860e88 100755
--- a/tests/openpgp/import.test
+++ b/tests/openpgp/import.test
@@ -31,11 +31,3 @@ if $GPG --list-keys --with-colons $keyid \
else
error "$goodkey: import failed (bug 1223)"
fi
-
-
-
-
-
-
-
-