diff options
author | NIIBE Yutaka <[email protected]> | 2020-08-19 04:21:32 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2020-08-19 04:21:32 +0000 |
commit | f3e424d4e7273e60e69747ca4936149af7b6482a (patch) | |
tree | 63dcee1926050f56f39726c82abe353a6b436887 | |
parent | scd: Fix possible uninitialized variables. (diff) | |
download | gnupg-f3e424d4e7273e60e69747ca4936149af7b6482a.tar.gz gnupg-f3e424d4e7273e60e69747ca4936149af7b6482a.zip |
Silence compiler warnings.
* common/openpgp-oid.c (map_openpgp_pk_to_gcry): Use cast for enum
conversion.
* dirmngr/dns-stuff.c (get_dns_srv): Use explicit conversion from
int to float.
* sm/gpgsm.c (parse_keyserver_line): Initialize ERR.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | common/openpgp-oid.c | 2 | ||||
-rw-r--r-- | dirmngr/dns-stuff.c | 2 | ||||
-rw-r--r-- | sm/gpgsm.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c index 4e53a74fd..02b87078b 100644 --- a/common/openpgp-oid.c +++ b/common/openpgp-oid.c @@ -568,7 +568,7 @@ map_openpgp_pk_to_gcry (pubkey_algo_t algo) case PUBKEY_ALGO_EDDSA: return GCRY_PK_EDDSA; case PUBKEY_ALGO_ECDSA: return GCRY_PK_ECDSA; case PUBKEY_ALGO_ECDH: return GCRY_PK_ECDH; - default: return algo < 110 ? algo : 0; + default: return algo < 110 ? (enum gcry_pk_algos)algo : 0; } } diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c index 07d0cca8d..cdda86d63 100644 --- a/dirmngr/dns-stuff.c +++ b/dirmngr/dns-stuff.c @@ -2196,7 +2196,7 @@ get_dns_srv (ctrl_t ctrl, (*list)[j].run_count=prio_count; } - chose=prio_count*rand()/RAND_MAX; + chose=prio_count*rand()/(float)RAND_MAX; for (j=i;j<srvcount && (*list)[i].priority==(*list)[j].priority;j++) { diff --git a/sm/gpgsm.c b/sm/gpgsm.c index cbce15594..6715527eb 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -955,7 +955,7 @@ parse_keyserver_line (char *line, int main ( int argc, char **argv) { - gpg_error_t err; + gpg_error_t err = 0; gpgrt_argparse_t pargs; int orig_argc; char **orig_argv; |