diff options
author | Werner Koch <wk@gnupg.org> | 2008-10-20 15:53:23 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-10-20 15:53:23 +0200 |
commit | 0a5f7424660e404e5fd0361b9331d154acf01d6c (patch) | |
tree | b84fb5a994045e12eb326441d8c924094bd915cd /sm | |
parent | Fix a bug in estream_snprintf. Found by a failed t-gettime under Windows. (diff) | |
download | gnupg2-0a5f7424660e404e5fd0361b9331d154acf01d6c.tar.xz gnupg2-0a5f7424660e404e5fd0361b9331d154acf01d6c.zip |
Marked all unused args on non-W32 platforms.
Diffstat (limited to 'sm')
-rw-r--r-- | sm/ChangeLog | 18 | ||||
-rw-r--r-- | sm/call-agent.c | 2 | ||||
-rw-r--r-- | sm/call-dirmngr.c | 6 | ||||
-rw-r--r-- | sm/certchain.c | 2 | ||||
-rw-r--r-- | sm/certlist.c | 2 | ||||
-rw-r--r-- | sm/gpgsm.c | 2 | ||||
-rw-r--r-- | sm/import.c | 4 | ||||
-rw-r--r-- | sm/keydb.c | 6 | ||||
-rw-r--r-- | sm/keylist.c | 6 | ||||
-rw-r--r-- | sm/qualified.c | 2 | ||||
-rw-r--r-- | sm/server.c | 10 |
11 files changed, 59 insertions, 1 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog index 796724354..2404c72f5 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog @@ -1,3 +1,21 @@ +2008-10-20 Werner Koch <wk@g10code.com> + + * keydb.c (keydb_locate_writable): Mark unused arg. + (keydb_search_kid): Ditto. + (keydb_clear_some_cert_flags): Ditto. + * server.c (cmd_encrypt): Ditto. + (cmd_decrypt, cmd_verify, cmd_import, cmd_genkey): Ditto. + * call-agent.c (gpgsm_scd_pksign): Ditto. + * call-dirmngr.c (release_dirmngr, release_dirmngr2) + (run_command_cb): Ditto. + * certlist.c (gpgsm_add_cert_to_certlist): Ditto. + * certchain.c (find_up_dirmngr): Ditto. + * keylist.c (print_key_data): Ditto. + (list_cert_raw, list_cert_std): Ditto. + * qualified.c (gpgsm_is_in_qualified_list): Ditto. + + * gpgsm.c (set_binary) [!W32]: Mark unused arg. + 2008-10-17 Werner Koch <wk@g10code.com> * call-dirmngr.c (start_dirmngr, start_dirmngr2): Reset the lock diff --git a/sm/call-agent.c b/sm/call-agent.c index d1dad6d07..bca44d2d6 100644 --- a/sm/call-agent.c +++ b/sm/call-agent.c @@ -232,6 +232,8 @@ gpgsm_scd_pksign (ctrl_t ctrl, const char *keyid, const char *desc, unsigned char *sigbuf; size_t sigbuflen; + (void)desc; + *r_buf = NULL; switch(digestalgo) diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c index 4d0977a4a..20017dd9e 100644 --- a/sm/call-dirmngr.c +++ b/sm/call-dirmngr.c @@ -339,6 +339,8 @@ start_dirmngr (ctrl_t ctrl) static void release_dirmngr (ctrl_t ctrl) { + (void)ctrl; + if (!dirmngr_ctx_locked) log_error ("WARNING: trying to release a non-locked dirmngr ctx\n"); dirmngr_ctx_locked = 0; @@ -363,6 +365,8 @@ start_dirmngr2 (ctrl_t ctrl) static void release_dirmngr2 (ctrl_t ctrl) { + (void)ctrl; + if (!dirmngr2_ctx_locked) log_error ("WARNING: trying to release a non-locked dirmngr2 ctx\n"); dirmngr2_ctx_locked = 0; @@ -859,6 +863,8 @@ gpgsm_dirmngr_lookup (ctrl_t ctrl, strlist_t names, int cache_only, static int run_command_cb (void *opaque, const void *buffer, size_t length) { + (void)opaque; + if (buffer) { if ( fwrite (buffer, length, 1, stdout) != 1 ) diff --git a/sm/certchain.c b/sm/certchain.c index 03b020e33..2d81dbf6c 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -539,6 +539,8 @@ find_up_dirmngr (ctrl_t ctrl, KEYDB_HANDLE kh, strlist_t names = NULL; int count = 0; char *pattern; + + (void)kh; if (opt.verbose) log_info (_("looking up issuer from the Dirmngr cache\n")); diff --git a/sm/certlist.c b/sm/certlist.c index 2b717ef8b..4137437a6 100644 --- a/sm/certlist.c +++ b/sm/certlist.c @@ -272,6 +272,8 @@ int gpgsm_add_cert_to_certlist (ctrl_t ctrl, ksba_cert_t cert, certlist_t *listaddr, int is_encrypt_to) { + (void)ctrl; + if (!is_cert_in_certlist (cert, *listaddr)) { certlist_t cl = xtrycalloc (1, sizeof *cl); diff --git a/sm/gpgsm.c b/sm/gpgsm.c index 3b8bf915b..f9034328d 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -693,6 +693,8 @@ set_binary (FILE *fp) { #ifdef HAVE_DOSISH_SYSTEM setmode (fileno (fp), O_BINARY); +#else + (void)fp; #endif } diff --git a/sm/import.c b/sm/import.c index 3045c89d5..03e84ec44 100644 --- a/sm/import.c +++ b/sm/import.c @@ -597,7 +597,9 @@ parse_p12 (ctrl_t ctrl, ksba_reader_t reader, stats->secret_dups++; } else if ( !strcmp (p, "bad-passphrase")) - ; + { + + } } else { diff --git a/sm/keydb.c b/sm/keydb.c index a6efcc4cd..26f195cbb 100644 --- a/sm/keydb.c +++ b/sm/keydb.c @@ -803,6 +803,8 @@ int keydb_locate_writable (KEYDB_HANDLE hd, const char *reserved) { int rc; + + (void)reserved; if (!hd) return gpg_error (GPG_ERR_INV_VALUE); @@ -942,6 +944,8 @@ int keydb_search_kid (KEYDB_HANDLE hd, u32 *kid) { KEYDB_SEARCH_DESC desc; + + (void)kid; memset (&desc, 0, sizeof desc); desc.mode = KEYDB_SEARCH_MODE_LONG_KID; @@ -1447,6 +1451,8 @@ keydb_clear_some_cert_flags (ctrl_t ctrl, strlist_t names) strlist_t sl; int rc=0; unsigned int old_value, value; + + (void)ctrl; hd = keydb_new (0); if (!hd) diff --git a/sm/keylist.c b/sm/keylist.c index 014147e69..2af474948 100644 --- a/sm/keylist.c +++ b/sm/keylist.c @@ -229,6 +229,9 @@ print_key_data (ksba_cert_t cert, estream_t fp) putchar(':'); putchar('\n'); } +#else + (void)cert; + (void)fp; #endif } @@ -649,6 +652,8 @@ list_cert_raw (ctrl_t ctrl, KEYDB_HANDLE hd, unsigned int reason; const unsigned char *cert_der = NULL; + (void)have_secret; + es_fprintf (fp, " ID: 0x%08lX\n", gpgsm_get_short_fingerprint (cert)); @@ -1017,6 +1022,7 @@ list_cert_std (ctrl_t ctrl, ksba_cert_t cert, estream_t fp, int have_secret, const char *oid; const unsigned char *cert_der = NULL; + (void)have_secret; es_fprintf (fp, " ID: 0x%08lX\n", gpgsm_get_short_fingerprint (cert)); diff --git a/sm/qualified.c b/sm/qualified.c index d90272804..d0db481b6 100644 --- a/sm/qualified.c +++ b/sm/qualified.c @@ -151,6 +151,8 @@ gpgsm_is_in_qualified_list (ctrl_t ctrl, ksba_cert_t cert, char *country) char mycountry[3]; int lnr = 0; + (void)ctrl; + if (country) *country = 0; diff --git a/sm/server.c b/sm/server.c index cd2b9f69a..9b0a04f18 100644 --- a/sm/server.c +++ b/sm/server.c @@ -465,6 +465,8 @@ cmd_encrypt (assuan_context_t ctx, char *line) FILE *out_fp; int rc; + (void)line; + inp_fd = translate_sys2libc_fd (assuan_get_input_fd (ctx), 0); if (inp_fd == -1) return set_error (GPG_ERR_ASS_NO_INPUT, NULL); @@ -519,6 +521,8 @@ cmd_decrypt (assuan_context_t ctx, char *line) FILE *out_fp; int rc; + (void)line; + inp_fd = translate_sys2libc_fd (assuan_get_input_fd (ctx), 0); if (inp_fd == -1) return set_error (GPG_ERR_ASS_NO_INPUT, NULL); @@ -562,6 +566,8 @@ cmd_verify (assuan_context_t ctx, char *line) int out_fd = translate_sys2libc_fd (assuan_get_output_fd (ctx), 1); FILE *out_fp = NULL; + (void)line; + if (fd == -1) return set_error (GPG_ERR_ASS_NO_INPUT, NULL); @@ -643,6 +649,8 @@ cmd_import (assuan_context_t ctx, char *line) int rc; int fd = translate_sys2libc_fd (assuan_get_input_fd (ctx), 0); + (void)line; + if (fd == -1) return set_error (GPG_ERR_ASS_NO_INPUT, NULL); @@ -922,6 +930,8 @@ cmd_genkey (assuan_context_t ctx, char *line) int rc; estream_t in_stream; + (void)line; + inp_fd = translate_sys2libc_fd (assuan_get_input_fd (ctx), 0); if (inp_fd == -1) return set_error (GPG_ERR_ASS_NO_INPUT, NULL); |