[svn] GnuPG - r4855 - in trunk: . agent common g10 jnlib kbx keyserver scd sm tests tools
svn author wk
cvs at cvs.gnupg.org
Mon Oct 20 15:53:26 CEST 2008
Author: wk
Date: 2008-10-20 15:53:23 +0200 (Mon, 20 Oct 2008)
New Revision: 4855
Modified:
trunk/ChangeLog
trunk/agent/ChangeLog
trunk/agent/call-pinentry.c
trunk/agent/call-scd.c
trunk/agent/command-ssh.c
trunk/agent/command.c
trunk/agent/findkey.c
trunk/agent/genkey.c
trunk/agent/protect-tool.c
trunk/agent/t-protect.c
trunk/autogen.sh
trunk/common/ChangeLog
trunk/common/asshelp.c
trunk/common/audit.c
trunk/common/estream.c
trunk/common/exechelp.c
trunk/common/http.c
trunk/common/iobuf.c
trunk/common/localename.c
trunk/common/signal.c
trunk/common/sysutils.c
trunk/common/t-convert.c
trunk/common/t-sexputil.c
trunk/g10/ChangeLog
trunk/g10/build-packet.c
trunk/g10/call-agent.c
trunk/g10/card-util.c
trunk/g10/cpr.c
trunk/g10/getkey.c
trunk/g10/gpg.c
trunk/g10/gpgv.c
trunk/g10/import.c
trunk/g10/keydb.c
trunk/g10/keyedit.c
trunk/g10/keygen.c
trunk/g10/keyring.c
trunk/g10/misc.c
trunk/g10/parse-packet.c
trunk/g10/passphrase.c
trunk/g10/server.c
trunk/g10/tdbdump.c
trunk/g10/trustdb.c
trunk/g10/verify.c
trunk/jnlib/ChangeLog
trunk/jnlib/argparse.c
trunk/jnlib/dotlock.c
trunk/jnlib/stringhelp.c
trunk/jnlib/t-stringhelp.c
trunk/jnlib/w32-afunix.c
trunk/kbx/ChangeLog
trunk/kbx/kbxutil.c
trunk/kbx/keybox-blob.c
trunk/kbx/keybox-dump.c
trunk/kbx/keybox-search.c
trunk/kbx/keybox-update.c
trunk/keyserver/ChangeLog
trunk/keyserver/curl-shim.c
trunk/scd/ChangeLog
trunk/scd/apdu.c
trunk/scd/app-nks.c
trunk/scd/app-openpgp.c
trunk/scd/app.c
trunk/scd/ccid-driver.c
trunk/scd/command.c
trunk/scd/pcsc-wrapper.c
trunk/scd/scdaemon.c
trunk/sm/ChangeLog
trunk/sm/call-agent.c
trunk/sm/call-dirmngr.c
trunk/sm/certchain.c
trunk/sm/certlist.c
trunk/sm/gpgsm.c
trunk/sm/import.c
trunk/sm/keydb.c
trunk/sm/keylist.c
trunk/sm/qualified.c
trunk/sm/server.c
trunk/tests/ChangeLog
trunk/tests/asschk.c
trunk/tools/ChangeLog
trunk/tools/gpg-connect-agent.c
trunk/tools/gpgparsemail.c
trunk/tools/gpgsplit.c
trunk/tools/no-libgcrypt.c
Log:
Marked all unused args on non-W32 platforms.
[The diff below has been truncated]
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,7 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ *
+
2008-10-17 Werner Koch <wk at g10code.com>
* configure.ac: Use more warning options with modern GCCs.
Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,20 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ * command.c (cmd_geteventcounter): Mark unused arg.
+ (cmd_listtrusted, cmd_pksign, cmd_pkdecrypt, cmd_genkey): Ditto.
+ (cmd_updatestartuptty, post_cmd_notify): Ditto.
+ * command-ssh.c (add_control_entry)
+ (ssh_handler_request_identities, ssh_handler_remove_identity)
+ (ssh_handler_remove_all_identities, ssh_handler_lock)
+ (ssh_handler_unlock): Ditto.
+ * call-pinentry.c (pinentry_active_p, popup_message_thread)
+ (agent_popup_message_stop): Ditto.
+ * findkey.c (agent_public_key_from_file): Ditto.
+ * genkey.c (check_passphrase_pattern): Ditto.
+ * call-scd.c (atfork_cb): Ditto.
+ * protect-tool.c (import_p12_cert_cb): Ditto.
+ * t-protect.c (main): Ditto.
+
2008-10-17 Werner Koch <wk at g10code.com>
* call-scd.c (start_scd) [W32]: Use snprintf again because we now
Modified: trunk/common/ChangeLog
===================================================================
--- trunk/common/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,24 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+
+ * http.c (http_register_tls_callback) [!HTTP_USE_GNUTLS]: Mark
+ unused arg.
+ * localename.c (do_nl_locale_name): Ditto.
+ * audit.c (event2str): Silent gcc warning.
+ * sysutils.c (translate_sys2libc_fd): Mark unused arg.
+ (translate_sys2libc_fd_int): Ditto.
+ * iobuf.c (translate_file_handle): Ditto.
+ * asshelp.c (send_one_option): Ditto.
+ * exechelp.c (gnupg_spawn_process): Ditto.
+ * signal.c (got_usr_signal): Ditto
+ * estream.c (es_func_fd_create) [!W32]: Ditto.
+ (es_func_fp_create) [!W32]: Ditto.
+ (es_write_hexstring): Ditto.
+ (dummy_mutex_call_void, dummy_mutex_call_int) [HAVE_PTH]: New.
+ (ESTREAM_MUTEX_LOCK, ESTREAM_MUTEX_UNLOCK, ESTREAM_MUTEX_TRYLOCK)
+ (ESTREAM_MUTEX_INITIALIZE) [HAVE_PTH]: Use dummy calls so to mark
+ unused arg.
+
2008-10-19 Werner Koch <wk at g10code.com>
* estream-printf.c (estream_vsnprintf): Fix return value.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,47 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ * gpgv.c: Mark all args of the stub fucntions as unused.
+
+ * card-util.c (generate_card_keys): Remove unused arg SERIALNO and
+ adjust caller.
+
+ * build-packet.c (write_sign_packet_header): Mark unused arg.
+ * gpg.c (gpg_init_default_ctrl, gpg_deinit_default_ctrl): Ditto.
+ * getkey.c (skip_unusable): Ditto.
+ (write_version): Ditto.
+ * keydb.c (keydb_locate_writable): Ditto.
+ * keyring.c (update_offset_hash_table): Ditto.
+ (keyring_lock): Ditto.
+ * misc.c (register_secured_file): Ditto.
+ (unregister_secured_file): Ditto.
+ (is_secured_file): Ditto.
+ (is_secured_filename): Ditto.
+ * parse-packet.c (parse_marker): Ditto.
+ (parse_key, parse_attribute): Ditto.
+ (parse_trust, parse_compressed, parse_mdc, parse_gpg_control): Ditto.
+ * cpr.c (progress_cb): Ditto.
+ * passphrase.c (passphrase_clear_cache): Ditto.
+ (ask_passphrase): Ditto.
+ * keyedit.c (keyedit_completion): Ditto.
+ * import.c (import_revoke_cert): Ditto.
+ (chk_self_sigs, delete_inv_parts, append_uid): Ditto.
+ (merge_sigs, merge_keysigs, append_key): Ditto.
+ * trustdb.c (list_trust_path): Ditto.
+ (enum_cert_paths, enum_cert_paths_print): Ditto.
+ * tdbdump.c (list_trustdb): Ditto.
+ * keygen.c (keygen_upd_std_prefs): Ditto.
+ (genhelp_factors): Ditto.
+ * call-agent.c (agent_scd_setattr): Ditto.
+ (agent_scd_writekey, agent_scd_change_pin, agent_scd_genkey): Ditto.
+ (agent_clear_pin_cache): Ditto.
+
+ * server.c (option_handler): Mark non yet used arg.
+ (input_notify, output_notify): Ditto.
+ (cmd_recipient, cmd_signer, cmd_encrypt, cmd_decrypt, cmd_verify)
+ (cmd_sign, cmd_import, cmd_export, cmd_delkeys, do_listkeys)
+ (cmd_genkey): Ditto.
+ * verify.c (gpg_verify): Ditto.
+
2008-10-17 Werner Koch <wk at g10code.com>
* main.h (idea_cipher_warn): Use do while construct in place of an
Modified: trunk/jnlib/ChangeLog
===================================================================
--- trunk/jnlib/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/jnlib/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,13 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ * w32-afunix.c (_w32_sock_connect): Mark ADDRLEN as unused.
+
+ * dotlock.c (release_dotlock): Do not mix declaration and code.
+
+ * stringhelp.c (make_basename): Silent gcc warning about unused arg.
+ * argparse.c (store_alias): Ditto.
+ (find_long_option):
+
2008-10-15 Werner Koch <wk at g10code.com>
* logging.c (do_logv) [W32]: Flush the log stream.
Modified: trunk/kbx/ChangeLog
===================================================================
--- trunk/kbx/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/kbx/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,14 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ * keybox-update.c (blob_filecopy): Remove unused arg n_packets.
+ (keybox_insert_cert): Adjust for that.
+ (keybox_update_cert): Mark unused args.
+ (keybox_set_flags): Ditto.
+ * keybox-blob.c (create_blob_trailer): Ditto.
+ * keybox-search.c (keybox_get_flags): Ditto.
+ * keybox-dump.c (_keybox_dump_find_dups): Ditto.
+ * kbxutil.c (my_gcry_logger): Ditto.
+
2008-05-06 Werner Koch <wk at g10code.com>
* keybox-file.c (_keybox_read_blob2): Return GPG_ERR_TOO_SHORT if
Modified: trunk/keyserver/ChangeLog
===================================================================
--- trunk/keyserver/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/keyserver/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,8 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ * curl-shim.c (curl_global_init): Mark usused arg.
+ (curl_version_info): Ditto.
+
2008-08-29 Werner Koch <wk at g10code.com>
* gpgkeys_kdns.c: Changed copyright notice to the FSF.
Modified: trunk/scd/ChangeLog
===================================================================
--- trunk/scd/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/scd/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,21 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ * pcsc-wrapper.c (read_32): Use provided arg and not stdin. Is
+ called with stdin, though.
+ (handle_close): Mark unused arg.
+ (handle_status, handle_reset): Ditto.
+
+ * ccid-driver.c (ccid_check_card_presence): Mark not yet used arg.
+
+ * scdaemon.c (scd_deinit_default_ctrl): Mark unused arg.
+ * command.c (cmd_unlock, cmd_restart, cmd_disconnect): Ditto.
+ * apdu.c (ct_get_status): Ditto.
+ (ct_send_apdu, pcsc_send_apdu_wrapped)
+ (apdu_open_remote_reader): Ditto.
+ * app.c (select_application): Ditto.
+ * app-openpgp.c (do_writecert, do_change_pin, do_writekey): Ditto.
+ * app-nks.c (do_change_pin, do_check_pin): Ditto.
+
2008-10-16 Werner Koch <wk at g10code.com>
* command.c (cmd_disconnect): New dummy command.
Modified: trunk/sm/ChangeLog
===================================================================
--- trunk/sm/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/sm/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,21 @@
+2008-10-20 Werner Koch <wk at 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 at g10code.com>
* call-dirmngr.c (start_dirmngr, start_dirmngr2): Reset the lock
Modified: trunk/tests/ChangeLog
===================================================================
--- trunk/tests/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/tests/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,9 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ * asschk.c (cmd_echo): Mark unused arg.
+ (cmd_send, cmd_expect_ok, cmd_expect_err, cmd_pipeserver)
+ (cmd_quit_if, cmd_fail_if): Ditto.
+
2008-09-29 Werner Koch <wk at g10code.com>
* Makefile.am (TESTS): Remove tests.
Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/tools/ChangeLog 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1,3 +1,13 @@
+2008-10-20 Werner Koch <wk at g10code.com>
+
+ * gpgsplit.c (write_part): Remove unused arg FNAME. Change caller.
+ (do_split): Ditto.
+
+ * no-libgcrypt.c (gcry_control): Mark unused arg.
+ * gpg-connect-agent.c (do_recvfd): Ditto.
+ * gpgparsemail.c (mime_signed_begin, mime_encrypted_begin): Ditto.
+ (pkcs7_begin): Ditto.
+
2008-10-01 Werner Koch <wk at g10code.com>
* gpg-connect-agent.c (main): New command datafile.
Modified: trunk/agent/call-pinentry.c
===================================================================
--- trunk/agent/call-pinentry.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/call-pinentry.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -410,6 +410,8 @@
int
pinentry_active_p (ctrl_t ctrl, int waitseconds)
{
+ (void)ctrl;
+
if (waitseconds > 0)
{
pth_event_t evt;
@@ -935,6 +937,8 @@
static void *
popup_message_thread (void *arg)
{
+ (void)arg;
+
/* We use the --one-button hack instead of the MESSAGE command to
allow the use of old Pinentries. Those old Pinentries will then
show an additional Cancel button but that is mostly a visual
@@ -1008,6 +1012,8 @@
int rc;
pid_t pid;
+ (void)ctrl;
+
if (!popup_tid || !entry_ctx)
{
log_debug ("agent_popup_message_stop called with no active popup\n");
Modified: trunk/agent/call-scd.c
===================================================================
--- trunk/agent/call-scd.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/call-scd.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -191,6 +191,8 @@
static void
atfork_cb (void *opaque, int where)
{
+ (void)opaque;
+
if (!where)
gcry_control (GCRYCTL_TERM_SECMEM);
}
Modified: trunk/agent/command-ssh.c
===================================================================
--- trunk/agent/command-ssh.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/command-ssh.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -782,6 +782,8 @@
FILE *fp;
int disabled;
+ (void)ctrl;
+
err = open_control_file (&fp, 1);
if (err)
return err;
@@ -1782,6 +1784,8 @@
char *cardsn;
gpg_error_t ret_err;
+ (void)request;
+
/* Prepare buffer stream. */
key_directory = NULL;
@@ -2541,6 +2545,8 @@
gpg_error_t ret_err;
gpg_error_t err;
+ (void)ctrl;
+
/* Receive key. */
key_blob = NULL;
@@ -2590,6 +2596,9 @@
{
gpg_error_t ret_err;
gpg_error_t err;
+
+ (void)ctrl;
+ (void)request;
err = ssh_identities_remove_all ();
@@ -2632,6 +2641,9 @@
{
gpg_error_t ret_err;
gpg_error_t err;
+
+ (void)ctrl;
+ (void)request;
err = ssh_lock ();
@@ -2650,6 +2662,9 @@
gpg_error_t ret_err;
gpg_error_t err;
+ (void)ctrl;
+ (void)request;
+
err = ssh_unlock ();
if (! err)
Modified: trunk/agent/command.c
===================================================================
--- trunk/agent/command.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/command.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -357,6 +357,8 @@
char key_counter[25];
char card_counter[25];
+ (void)line;
+
snprintf (any_counter, sizeof any_counter, "%u", eventcounter.any);
snprintf (key_counter, sizeof key_counter, "%u", eventcounter.key);
snprintf (card_counter, sizeof card_counter, "%u", eventcounter.card);
@@ -436,7 +438,11 @@
static int
cmd_listtrusted (assuan_context_t ctx, char *line)
{
- int rc = agent_listtrusted (ctx);
+ int rc;
+
+ (void)line;
+
+ rc = agent_listtrusted (ctx);
if (rc)
log_error ("command listtrusted failed: %s\n", gpg_strerror (rc));
return rc;
@@ -652,6 +658,8 @@
ctrl_t ctrl = assuan_get_pointer (ctx);
membuf_t outbuf;
+ (void)line;
+
if (opt.ignore_cache_for_signing)
cache_mode = CACHE_MODE_IGNORE;
else if (!ctrl->server_local->use_cache_for_signing)
@@ -685,6 +693,8 @@
size_t valuelen;
membuf_t outbuf;
+ (void)line;
+
/* First inquire the data to decrypt */
rc = assuan_inquire (ctx, "CIPHERTEXT",
&value, &valuelen, MAXLEN_CIPHERTEXT);
@@ -731,6 +741,8 @@
size_t valuelen;
membuf_t outbuf;
+ (void)line;
+
/* First inquire the parameters */
rc = assuan_inquire (ctx, "KEYPARAM", &value, &valuelen, MAXLEN_KEYPARAM);
if (rc)
@@ -1312,6 +1324,8 @@
{
ctrl_t ctrl = assuan_get_pointer (ctx);
+ (void)line;
+
xfree (opt.startup_display); opt.startup_display = NULL;
xfree (opt.startup_ttyname); opt.startup_ttyname = NULL;
xfree (opt.startup_ttytype); opt.startup_ttytype = NULL;
@@ -1505,6 +1519,8 @@
post_cmd_notify (assuan_context_t ctx, int err)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
+
+ (void)err;
/* Switch off any I/O monitor controlled logging pausing. */
ctrl->server_local->pause_io_logging = 0;
Modified: trunk/agent/findkey.c
===================================================================
--- trunk/agent/findkey.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/findkey.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -669,6 +669,8 @@
const char *elems;
gcry_mpi_t *array;
+ (void)ctrl;
+
*result = NULL;
rc = read_key_file (grip, &s_skey);
Modified: trunk/agent/genkey.c
===================================================================
--- trunk/agent/genkey.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/genkey.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -99,6 +99,8 @@
pid_t pid;
int result, i;
+ (void)ctrl;
+
infp = gnupg_tmpfile ();
if (!infp)
{
Modified: trunk/agent/protect-tool.c
===================================================================
--- trunk/agent/protect-tool.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/protect-tool.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -630,6 +630,8 @@
struct b64state state;
gpg_error_t err, err2;
+ (void)opaque;
+
err = b64enc_start (&state, stdout, "CERTIFICATE");
if (!err)
err = b64enc_write (&state, cert, certlen);
Modified: trunk/agent/t-protect.c
===================================================================
--- trunk/agent/t-protect.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/agent/t-protect.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -294,6 +294,9 @@
int
main (int argc, char **argv)
{
+ (void)argc;
+ (void)argv;
+
gcry_control (GCRYCTL_DISABLE_SECMEM);
test_agent_protect ();
Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/autogen.sh 2008-10-20 13:53:23 UTC (rev 4855)
@@ -208,4 +208,6 @@
echo "Running autoconf${FORCE} ..."
$AUTOCONF${FORCE}
-echo "You may now run \"./configure --sysconfdir=/etc --enable-maintainer-mode && make\"."
+echo "You may now run:
+ ./configure --sysconfdir=/etc --enable-maintainer-mode && make
+"
Modified: trunk/common/asshelp.c
===================================================================
--- trunk/common/asshelp.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/asshelp.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -42,6 +42,8 @@
gpg_error_t err;
char *optstr;
+ (void)errsource;
+
if (!value || !*value)
err = 0; /* Avoid sending empty strings. */
else if (asprintf (&optstr, "OPTION %s=%s", name, value ) < 0)
Modified: trunk/common/audit.c
===================================================================
--- trunk/common/audit.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/audit.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -115,7 +115,9 @@
static const char *
event2str (audit_event_t event)
{
- int idx = eventstr_msgidxof (event);
+ /* We need the cast so that compiler does not complain about an
+ always true comparison (>= 0) for an unsigned value. */
+ int idx = eventstr_msgidxof ((int)event);
if (idx == -1)
return "Unknown event";
else
Modified: trunk/common/estream.c
===================================================================
--- trunk/common/estream.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/estream.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -114,11 +114,25 @@
#else
typedef void *estream_mutex_t;
+
+static inline void
+dummy_mutex_call_void (estream_mutex_t mutex)
+{
+ (void)mutex;
+}
+
+static inline int
+dummy_mutex_call_int (estream_mutex_t mutex)
+{
+ (void)mutex;
+ return 0;
+}
+
# define ESTREAM_MUTEX_INITIALIZER NULL
-# define ESTREAM_MUTEX_LOCK(mutex) (void) 0
-# define ESTREAM_MUTEX_UNLOCK(mutex) (void) 0
-# define ESTREAM_MUTEX_TRYLOCK(mutex) 0
-# define ESTREAM_MUTEX_INITIALIZE(mutex) (void) 0
+# define ESTREAM_MUTEX_LOCK(mutex) dummy_mutex_call_void ((mutex))
+# define ESTREAM_MUTEX_UNLOCK(mutex) dummy_mutex_call_void ((mutex))
+# define ESTREAM_MUTEX_TRYLOCK(mutex) dummy_mutex_call_int ((mutex))
+# define ESTREAM_MUTEX_INITIALIZE(mutex) dummy_mutex_call_void ((mutex))
#endif
/* Primitive system I/O. */
@@ -183,11 +197,7 @@
};
static estream_list_t estream_list;
-#ifdef HAVE_PTH
-/* Note that we can't use a static initialization with W32Pth, thus we
- do it in es_init. */
static estream_mutex_t estream_list_lock;
-#endif
#define ESTREAM_LIST_LOCK ESTREAM_MUTEX_LOCK (estream_list_lock)
#define ESTREAM_LIST_UNLOCK ESTREAM_MUTEX_UNLOCK (estream_list_lock)
@@ -620,6 +630,8 @@
/* Make sure it is in binary mode if requested. */
if ( (modeflags & O_BINARY) )
setmode (fd, O_BINARY);
+#else
+ (void)modeflags;
#endif
fd_cookie->fd = fd;
fd_cookie->no_close = no_close;
@@ -721,7 +733,8 @@
/* Create function for fd objects. */
static int
-es_func_fp_create (void **cookie, FILE *fp, unsigned int modeflags, int no_close)
+es_func_fp_create (void **cookie, FILE *fp,
+ unsigned int modeflags, int no_close)
{
estream_cookie_fp_t fp_cookie;
int err;
@@ -735,6 +748,8 @@
/* Make sure it is in binary mode if requested. */
if ( (modeflags & O_BINARY) )
setmode (fileno (fp), O_BINARY);
+#else
+ (void)modeflags;
#endif
fp_cookie->fp = fp;
fp_cookie->no_close = no_close;
@@ -3145,6 +3160,8 @@
const unsigned char *s;
size_t count = 0;
+ (void)reserved;
+
#define tohex(n) ((n) < 10 ? ((n) + '0') : (((n) - 10) + 'A'))
if (!length)
Modified: trunk/common/exechelp.c
===================================================================
--- trunk/common/exechelp.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/exechelp.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -351,6 +351,8 @@
char *cmdline;
int fd, fdout, rp[2];
+ (void)preexec;
+
/* Setup return values. */
*statusfile = NULL;
*pid = (pid_t)(-1);
@@ -452,6 +454,8 @@
gpg_error_t err;
int fd, fdout, rp[2];
+ (void)flags; /* Currently not used. */
+
*statusfile = NULL;
*pid = (pid_t)(-1);
fflush (infile);
@@ -767,8 +771,8 @@
to pass the GPG_AGENT_INFO variable to gpg-agent. As the default
on windows is to use a standard socket, this does not really
matter. */
+ (void)envp;
-
if (access (pgmname, X_OK))
return gpg_error_from_syserror ();
Modified: trunk/common/http.c
===================================================================
--- trunk/common/http.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/http.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -304,6 +304,8 @@
{
#ifdef HTTP_USE_GNUTLS
tls_callback = (gpg_error_t (*) (http_t, gnutls_session_t, int))cb;
+#else
+ (void)cb;
#endif
}
Modified: trunk/common/iobuf.c
===================================================================
--- trunk/common/iobuf.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/iobuf.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -412,14 +412,20 @@
size_t nbytes = 0;
int rc = 0;
+ (void)chain; /* Not used. */
+
#ifdef FILE_FILTER_USES_STDIO
if (control == IOBUFCTRL_UNDERFLOW)
{
- assert (size); /* need a buffer */
+ assert (size); /* We need a buffer. */
if (feof (f))
- { /* On terminals you could easiely read as many EOFs as you call */
- rc = -1; /* fread() or fgetc() repeatly. Every call will block until you press */
- *ret_len = 0; /* CTRL-D. So we catch this case before we call fread() again. */
+ {
+ /* On terminals you could easily read as many EOFs as you
+ call fread() or fgetc() repeatly. Every call will block
+ until you press CTRL-D. So we catch this case before we
+ call fread() again. */
+ rc = -1;
+ *ret_len = 0;
}
else
{
@@ -427,7 +433,7 @@
nbytes = fread (buf, 1, size, f);
if (feof (f) && !nbytes)
{
- rc = -1; /* okay: we can return EOF now. */
+ rc = -1; /* Okay: we can return EOF now. */
}
else if (ferror (f) && errno != EPIPE)
{
@@ -469,13 +475,13 @@
fclose (f);
}
f = NULL;
- xfree (a); /* we can free our context now */
+ xfree (a); /* We can free our context now. */
}
#else /* !stdio implementation */
if (control == IOBUFCTRL_UNDERFLOW)
{
- assert (size); /* need a buffer */
+ assert (size); /* We need a buffer. */
if (a->eof_seen)
{
rc = -1;
@@ -620,9 +626,9 @@
}
f = INVALID_FP;
#endif
- xfree (a); /* we can free our context now */
+ xfree (a); /* We can free our context now. */
}
-#endif /* !stdio implementation */
+#endif /* !stdio implementation. */
return rc;
}
@@ -639,6 +645,8 @@
size_t nbytes = 0;
int rc = 0;
+ (void)chain;
+
if (control == IOBUFCTRL_UNDERFLOW)
{
assert (size); /* need a buffer */
@@ -2408,6 +2416,8 @@
# else
{
int x;
+
+ (void)for_write;
if (fd == 0)
x = (int) GetStdHandle (STD_INPUT_HANDLE);
@@ -2425,6 +2435,8 @@
fd = x;
}
# endif
+#else
+ (void)for_write;
#endif
return fd;
}
Modified: trunk/common/localename.c
===================================================================
--- trunk/common/localename.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/localename.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -65,6 +65,7 @@
/* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
On some systems this can be done by the 'setlocale' function itself. */
# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+ (void)categoryname;
retval = setlocale (category, NULL);
# else
/* Setting of LC_ALL overwrites all other. */
Modified: trunk/common/signal.c
===================================================================
--- trunk/common/signal.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/signal.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -146,6 +146,7 @@
static RETSIGTYPE
got_usr_signal (int sig)
{
+ (void)sig;
caught_sigusr1 = 1;
}
#endif /*!HAVE_DOSISH_SYSTEM*/
Modified: trunk/common/sysutils.c
===================================================================
--- trunk/common/sysutils.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/sysutils.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -299,6 +299,7 @@
log_error ("failed to translate osfhandle %p\n", (void *) fd);
return x;
#else /*!HAVE_W32_SYSTEM */
+ (void)for_write;
return fd;
#endif
}
@@ -314,6 +315,7 @@
return translate_sys2libc_fd ((void*)fd, for_write);
#else
+ (void)for_write;
return fd;
#endif
}
Modified: trunk/common/t-convert.c
===================================================================
--- trunk/common/t-convert.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/t-convert.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -447,6 +447,8 @@
int
main (int argc, char **argv)
{
+ (void)argc;
+ (void)argv;
test_hex2bin ();
test_hexcolon2bin ();
Modified: trunk/common/t-sexputil.c
===================================================================
--- trunk/common/t-sexputil.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/common/t-sexputil.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -74,7 +74,9 @@
int
main (int argc, char **argv)
{
-
+ (void)argc;
+ (void)argv;
+
test_hash_algo_from_sigval ();
return 0;
Modified: trunk/g10/build-packet.c
===================================================================
--- trunk/g10/build-packet.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/build-packet.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1241,14 +1241,16 @@
static int
-write_sign_packet_header( IOBUF out, int ctb, u32 len )
+write_sign_packet_header (IOBUF out, int ctb, u32 len)
{
- /* work around a bug in the pgp read function for signature packets,
- * which are not correctly coded and silently assume at some
- * point 2 byte length headers.*/
- iobuf_put(out, 0x89 );
- iobuf_put(out, len >> 8 );
- return iobuf_put(out, len ) == -1 ? -1:0;
+ (void)ctb;
+
+ /* Work around a bug in the pgp read function for signature packets,
+ which are not correctly coded and silently assume at some point 2
+ byte length headers.*/
+ iobuf_put (out, 0x89 );
+ iobuf_put (out, len >> 8 );
+ return iobuf_put (out, len) == -1 ? -1:0;
}
/****************
@@ -1350,9 +1352,11 @@
}
static int
-write_version( IOBUF out, int ctb )
+write_version (IOBUF out, int ctb)
{
- if( iobuf_put( out, 3 ) )
- return -1;
- return 0;
+ (void)ctb;
+
+ if (iobuf_put (out, 3))
+ return -1;
+ return 0;
}
Modified: trunk/g10/call-agent.c
===================================================================
--- trunk/g10/call-agent.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/call-agent.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -418,6 +418,8 @@
char line[ASSUAN_LINELENGTH];
char *p;
+ (void)serialno;
+
if (!*name || !valuelen)
return gpg_error (GPG_ERR_INV_VALUE);
@@ -532,6 +534,8 @@
char line[ASSUAN_LINELENGTH];
struct writekey_parm_s parms;
+ (void)serialno;
+
rc = start_agent ();
if (rc)
return rc;
@@ -616,6 +620,8 @@
char line[ASSUAN_LINELENGTH];
gnupg_isotime_t tbuf;
+ (void)serialno;
+
rc = start_agent ();
if (rc)
return rc;
@@ -775,6 +781,8 @@
char line[ASSUAN_LINELENGTH];
const char *reset = "";
+ (void)serialno;
+
if (chvno >= 100)
reset = "--reset";
chvno %= 100;
@@ -816,7 +824,7 @@
void
agent_clear_pin_cache (const char *sn)
{
-
+ (void)sn;
}
Modified: trunk/g10/card-util.c
===================================================================
--- trunk/g10/card-util.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/card-util.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1127,7 +1127,7 @@
static void
-generate_card_keys (const char *serialno)
+generate_card_keys (void)
{
struct agent_card_info_s info;
int forced_chv1;
@@ -1674,7 +1674,7 @@
break;
case cmdGENERATE:
- generate_card_keys (serialnobuf);
+ generate_card_keys ();
break;
case cmdPASSWD:
Modified: trunk/g10/cpr.c
===================================================================
--- trunk/g10/cpr.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/cpr.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -48,6 +48,8 @@
{
char buf[50];
+ (void)ctx;
+
if ( printchar == '\n' && !strcmp (what, "primegen") )
snprintf (buf, sizeof buf -1, "%.20s X 100 100", what );
else
Modified: trunk/g10/getkey.c
===================================================================
--- trunk/g10/getkey.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/getkey.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -760,10 +760,12 @@
static int
-skip_unusable(void *dummy,u32 *keyid,PKT_user_id *uid)
+skip_unusable (void *dummy, u32 *keyid, PKT_user_id *uid)
{
int unusable=0;
KBNODE keyblock;
+
+ (void)dummy;
keyblock=get_pubkeyblock(keyid);
if(!keyblock)
Modified: trunk/g10/gpg.c
===================================================================
--- trunk/g10/gpg.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/gpg.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1766,6 +1766,7 @@
static void
gpg_init_default_ctrl (ctrl_t ctrl)
{
+ (void)ctrl;
}
@@ -1774,6 +1775,7 @@
static void
gpg_deinit_default_ctrl (ctrl_t ctrl)
{
+ (void)ctrl;
}
Modified: trunk/g10/gpgv.c
===================================================================
--- trunk/g10/gpgv.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/gpgv.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -200,12 +200,21 @@
int
check_signatures_trust( PKT_signature *sig )
{
- return 0;
+ (void)sig;
+ return 0;
}
void
-read_trust_options(byte *trust_model,ulong *created,ulong *nextcheck,
- byte *marginals,byte *completes,byte *cert_depth) {}
+read_trust_options(byte *trust_model, ulong *created, ulong *nextcheck,
+ byte *marginals, byte *completes, byte *cert_depth)
+{
+ (void)trust_model;
+ (void)created;
+ (void)nextcheck;
+ (void)marginals;
+ (void)completes;
+ (void)cert_depth;
+}
/* Stub:
* We don't have the trustdb , so we have to provide some stub functions
@@ -215,46 +224,58 @@
int
cache_disabled_value(PKT_public_key *pk)
{
+ (void)pk;
return 0;
}
void
-check_trustdb_stale(void) {}
+check_trustdb_stale(void)
+{
+}
int
get_validity_info (PKT_public_key *pk, PKT_user_id *uid)
{
- return '?';
+ (void)pk;
+ (void)uid;
+ return '?';
}
unsigned int
get_validity (PKT_public_key *pk, PKT_user_id *uid)
{
+ (void)pk;
+ (void)uid;
return 0;
}
const char *
trust_value_to_string (unsigned int value)
{
+ (void)value;
return "err";
}
const char *
-uid_trust_string_fixed(PKT_public_key *key,PKT_user_id *uid)
+uid_trust_string_fixed (PKT_public_key *key, PKT_user_id *uid)
{
+ (void)key;
+ (void)uid;
return "err";
}
int
get_ownertrust_info (PKT_public_key *pk)
{
- return '?';
+ (void)pk;
+ return '?';
}
unsigned int
get_ownertrust (PKT_public_key *pk)
{
- return TRUST_UNKNOWN;
+ (void)pk;
+ return TRUST_UNKNOWN;
}
@@ -264,122 +285,217 @@
*/
struct keyserver_spec *
-keyserver_match(struct keyserver_spec *spec) { return NULL; }
+keyserver_match (struct keyserver_spec *spec)
+{
+ (void)spec;
+ return NULL;
+}
int
-keyserver_import_keyid( u32 *keyid, void *dummy )
+keyserver_import_keyid (u32 *keyid, void *dummy)
{
- return -1;
+ (void)keyid;
+ (void)dummy;
+ return -1;
}
int
-keyserver_import_cert(const char *name) { return -1; }
+keyserver_import_cert (const char *name)
+{
+ (void)name;
+ return -1;
+}
int
-keyserver_import_pka(const char *name,unsigned char *fpr) { return -1; }
+keyserver_import_pka (const char *name,unsigned char *fpr)
+{
+ (void)name;
+ (void)fpr;
+ return -1;
+}
int
-keyserver_import_name(const char *name,struct keyserver_spec *spec)
+keyserver_import_name (const char *name,struct keyserver_spec *spec)
{
+ (void)name;
+ (void)spec;
return -1;
}
int
-keyserver_import_ldap(const char *name) { return -1; }
+keyserver_import_ldap (const char *name)
+{
+ (void)name;
+ return -1;
+}
/* Stub:
* No encryption here but mainproc links to these functions.
*/
int
-get_session_key( PKT_pubkey_enc *k, DEK *dek )
+get_session_key (PKT_pubkey_enc *k, DEK *dek)
{
- return G10ERR_GENERAL;
+ (void)k;
+ (void)dek;
+ return G10ERR_GENERAL;
}
+
/* Stub: */
int
-get_override_session_key( DEK *dek, const char *string )
+get_override_session_key (DEK *dek, const char *string)
{
- return G10ERR_GENERAL;
+ (void)dek;
+ (void)string;
+ return G10ERR_GENERAL;
}
+
/* Stub: */
int
-decrypt_data( void *procctx, PKT_encrypted *ed, DEK *dek )
+decrypt_data (void *procctx, PKT_encrypted *ed, DEK *dek)
{
- return G10ERR_GENERAL;
+ (void)procctx;
+ (void)ed;
+ (void)dek;
+ return G10ERR_GENERAL;
}
/* Stub:
- * No interactive commnds, so we don't need the helptexts
+ * No interactive commands, so we don't need the helptexts
*/
void
-display_online_help( const char *keyword )
+display_online_help (const char *keyword)
{
+ (void)keyword;
}
/* Stub:
* We don't use secret keys, but getkey.c links to this
*/
int
-check_secret_key( PKT_secret_key *sk, int n )
+check_secret_key (PKT_secret_key *sk, int n)
{
- return G10ERR_GENERAL;
+ (void)sk;
+ (void)n;
+ return G10ERR_GENERAL;
}
/* Stub:
* No secret key, so no passphrase needed
*/
DEK *
-passphrase_to_dek( u32 *keyid, int pubkey_algo,
- int cipher_algo, STRING2KEY *s2k, int mode,
+passphrase_to_dek (u32 *keyid, int pubkey_algo,
+ int cipher_algo, STRING2KEY *s2k, int mode,
const char *tmp, int *canceled)
{
+ (void)keyid;
+ (void)pubkey_algo;
+ (void)cipher_algo;
+ (void)s2k;
+ (void)mode;
+ (void)tmp;
+
if (canceled)
*canceled = 0;
return NULL;
}
-struct keyserver_spec *parse_preferred_keyserver(PKT_signature *sig) {return NULL;}
-struct keyserver_spec *parse_keyserver_uri(const char *uri,int require_scheme,
- const char *configname,
- unsigned int configlineno)
+struct keyserver_spec *
+parse_preferred_keyserver(PKT_signature *sig)
{
+ (void)sig;
return NULL;
}
-void free_keyserver_spec(struct keyserver_spec *keyserver) {}
+struct keyserver_spec *
+parse_keyserver_uri (const char *uri, int require_scheme,
+ const char *configname, unsigned int configlineno)
+{
+ (void)uri;
+ (void)require_scheme;
+ (void)configname;
+ (void)configlineno;
+ return NULL;
+}
+void
+free_keyserver_spec (struct keyserver_spec *keyserver)
+{
+ (void)keyserver;
+}
+
/* Stubs to avoid linking to photoid.c */
-void show_photos(const struct user_attribute *attrs,int count,PKT_public_key *pk) {}
-int parse_image_header(const struct user_attribute *attr,byte *type,u32 *len) {return 0;}
-char *image_type_to_string(byte type,int string) {return NULL;}
+void
+show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
+{
+ (void)attrs;
+ (void)count;
+ (void)pk;
+}
+int
+parse_image_header (const struct user_attribute *attr, byte *type, u32 *len)
+{
+ (void)attr;
+ (void)type;
+ (void)len;
+ return 0;
+}
+
+char *
+image_type_to_string (byte type, int string)
+{
+ (void)type;
+ (void)string;
+ return NULL;
+}
+
#ifdef ENABLE_CARD_SUPPORT
-int agent_scd_getattr (const char *name, struct agent_card_info_s *info) {return 0;}
+int
+agent_scd_getattr (const char *name, struct agent_card_info_s *info)
+{
+ (void)name;
+ (void)info;
+ return 0;
+}
#endif /* ENABLE_CARD_SUPPORT */
-/* Stubs to void linking to ../cipher/cipher.c */
-const char *cipher_algo_to_string( int algo ) { return "?";}
-void disable_cipher_algo( int algo ) {}
-int check_cipher_algo( int algo ) { return -1;}
-unsigned int cipher_get_keylen( int algo ) { return 0; }
-unsigned int cipher_get_blocksize( int algo ) {return 0;}
-gcry_cipher_hd_t cipher_open( int algo, int mode, int secure ) { return NULL;}
-void cipher_close( gcry_cipher_hd_t c ) {}
-int cipher_setkey( gcry_cipher_hd_t c, byte *key, unsigned keylen ) { return -1;}
-void cipher_setiv( gcry_cipher_hd_t c, const byte *iv, unsigned ivlen ){}
-void cipher_encrypt( gcry_cipher_hd_t c, byte *outbuf,
- byte *inbuf, unsigned nbytes ) {}
-void cipher_decrypt( gcry_cipher_hd_t c, byte *outbuf,
- byte *inbuf, unsigned nbytes ) {}
-void cipher_sync( gcry_cipher_hd_t c ) {}
+/* We do not do any locking, so use these stubs here */
+void
+disable_dotlock (void)
+{
+}
+DOTLOCK
+create_dotlock (const char *file_to_lock)
+{
+ (void)file_to_lock;
+ return NULL;
+}
+void
+destroy_dotlock (DOTLOCK h)
+{
+ (void)h;
+}
-/* We do not do any locking, so use these stubs here */
-void disable_dotlock(void) {}
-DOTLOCK create_dotlock( const char *file_to_lock ) { return NULL; }
-void destroy_dotlock (DOTLOCK h) {}
-int make_dotlock( DOTLOCK h, long timeout ) { return 0;}
-int release_dotlock( DOTLOCK h ) {return 0;}
-void remove_lockfiles(void) {}
+int
+make_dotlock (DOTLOCK h, long timeout)
+{
+ (void)h;
+ (void)timeout;
+ return 0;
+}
+
+int
+release_dotlock (DOTLOCK h)
+{
+ (void)h;
+ return 0;
+}
+
+void
+remove_lockfiles (void)
+{
+}
+
Modified: trunk/g10/import.c
===================================================================
--- trunk/g10/import.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/import.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1238,6 +1238,8 @@
u32 keyid[2];
int rc = 0;
+ (void)fname;
+
assert( !node->next );
assert( node->pkt->pkttype == PKT_SIGNATURE );
assert( node->pkt->pkt.signature->sig_class == 0x20 );
@@ -1365,6 +1367,9 @@
u32 bsdate=0,rsdate=0;
KBNODE bsnode=NULL,rsnode=NULL;
+ (void)fname;
+ (void)pk;
+
for( n=keyblock; (n = find_next_kbnode(n, 0)); ) {
if(n->pkt->pkttype==PKT_PUBLIC_SUBKEY)
{
@@ -1537,6 +1542,8 @@
KBNODE node;
int nvalid=0, uid_seen=0, subkey_seen=0;
+ (void)fname;
+
for(node=keyblock->next; node; node = node->next ) {
if( node->pkt->pkttype == PKT_USER_ID ) {
uid_seen = 1;
@@ -2047,11 +2054,14 @@
* append the userid starting with NODE and all signatures to KEYBLOCK.
*/
static int
-append_uid( KBNODE keyblock, KBNODE node, int *n_sigs,
- const char *fname, u32 *keyid )
+append_uid (KBNODE keyblock, KBNODE node, int *n_sigs,
+ const char *fname, u32 *keyid )
{
KBNODE n, n_where=NULL;
+ (void)fname;
+ (void)keyid;
+
assert(node->pkt->pkttype == PKT_USER_ID );
/* find the position */
@@ -2099,6 +2109,9 @@
KBNODE n, n2;
int found=0;
+ (void)fname;
+ (void)keyid;
+
assert(dst->pkt->pkttype == PKT_USER_ID );
assert(src->pkt->pkttype == PKT_USER_ID );
@@ -2134,12 +2147,15 @@
* Merge the sigs from SRC onto DST. SRC and DST are both a PKT_xxx_SUBKEY.
*/
static int
-merge_keysigs( KBNODE dst, KBNODE src, int *n_sigs,
- const char *fname, u32 *keyid )
+merge_keysigs (KBNODE dst, KBNODE src, int *n_sigs,
+ const char *fname, u32 *keyid)
{
KBNODE n, n2;
int found=0;
+ (void)fname;
+ (void)keyid;
+
assert( dst->pkt->pkttype == PKT_PUBLIC_SUBKEY
|| dst->pkt->pkttype == PKT_SECRET_SUBKEY );
@@ -2187,11 +2203,14 @@
* Mark all new and copied packets by setting flag bit 0.
*/
static int
-append_key( KBNODE keyblock, KBNODE node, int *n_sigs,
- const char *fname, u32 *keyid )
+append_key (KBNODE keyblock, KBNODE node, int *n_sigs,
+ const char *fname, u32 *keyid)
{
KBNODE n;
+ (void)fname;
+ (void)keyid;
+
assert( node->pkt->pkttype == PKT_PUBLIC_SUBKEY
|| node->pkt->pkttype == PKT_SECRET_SUBKEY );
Modified: trunk/g10/keydb.c
===================================================================
--- trunk/g10/keydb.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/keydb.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -644,7 +644,9 @@
keydb_locate_writable (KEYDB_HANDLE hd, const char *reserved)
{
int rc;
-
+
+ (void)reserved;
+
if (!hd)
return G10ERR_INV_ARG;
Modified: trunk/g10/keyedit.c
===================================================================
--- trunk/g10/keyedit.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/keyedit.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -1494,6 +1494,8 @@
/* If we are at the start of a line, we try and command-complete.
If not, just do nothing for now. */
+ (void)end;
+
if(start==0)
return rl_completion_matches(text,command_generator);
Modified: trunk/g10/keygen.c
===================================================================
--- trunk/g10/keygen.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/keygen.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -631,42 +631,45 @@
xfree (buf);
}
+
int
-keygen_upd_std_prefs( PKT_signature *sig, void *opaque )
+keygen_upd_std_prefs (PKT_signature *sig, void *opaque)
{
- if (!prefs_initialized)
- keygen_set_std_prefs (NULL, 0);
+ (void)opaque;
+
+ if (!prefs_initialized)
+ keygen_set_std_prefs (NULL, 0);
+
+ if (nsym_prefs)
+ build_sig_subpkt (sig, SIGSUBPKT_PREF_SYM, sym_prefs, nsym_prefs);
+ else
+ {
+ delete_sig_subpkt (sig->hashed, SIGSUBPKT_PREF_SYM);
+ delete_sig_subpkt (sig->unhashed, SIGSUBPKT_PREF_SYM);
+ }
+
+ if (nhash_prefs)
+ build_sig_subpkt (sig, SIGSUBPKT_PREF_HASH, hash_prefs, nhash_prefs);
+ else
+ {
+ delete_sig_subpkt (sig->hashed, SIGSUBPKT_PREF_HASH);
+ delete_sig_subpkt (sig->unhashed, SIGSUBPKT_PREF_HASH);
+ }
- if (nsym_prefs)
- build_sig_subpkt (sig, SIGSUBPKT_PREF_SYM, sym_prefs, nsym_prefs);
- else
- {
- delete_sig_subpkt (sig->hashed, SIGSUBPKT_PREF_SYM);
- delete_sig_subpkt (sig->unhashed, SIGSUBPKT_PREF_SYM);
- }
+ if (nzip_prefs)
+ build_sig_subpkt (sig, SIGSUBPKT_PREF_COMPR, zip_prefs, nzip_prefs);
+ else
+ {
+ delete_sig_subpkt (sig->hashed, SIGSUBPKT_PREF_COMPR);
+ delete_sig_subpkt (sig->unhashed, SIGSUBPKT_PREF_COMPR);
+ }
+
+ /* Make sure that the MDC feature flag is set if needed. */
+ add_feature_mdc (sig,mdc_available);
+ add_keyserver_modify (sig,ks_modify);
+ keygen_add_keyserver_url(sig,NULL);
- if (nhash_prefs)
- build_sig_subpkt (sig, SIGSUBPKT_PREF_HASH, hash_prefs, nhash_prefs);
- else
- {
- delete_sig_subpkt (sig->hashed, SIGSUBPKT_PREF_HASH);
- delete_sig_subpkt (sig->unhashed, SIGSUBPKT_PREF_HASH);
- }
-
- if (nzip_prefs)
- build_sig_subpkt (sig, SIGSUBPKT_PREF_COMPR, zip_prefs, nzip_prefs);
- else
- {
- delete_sig_subpkt (sig->hashed, SIGSUBPKT_PREF_COMPR);
- delete_sig_subpkt (sig->unhashed, SIGSUBPKT_PREF_COMPR);
- }
-
- /* Make sure that the MDC feature flag is set if needed */
- add_feature_mdc (sig,mdc_available);
- add_keyserver_modify (sig,ks_modify);
- keygen_add_keyserver_url(sig,NULL);
-
- return 0;
+ return 0;
}
@@ -1102,6 +1105,8 @@
static void
genhelp_factors (gcry_sexp_t misc_key_info, KBNODE sec_root)
{
+ (void)misc_key_info;
+ (void)sec_root;
#if 0 /* Not used anymore */
size_t n;
char *buf;
Modified: trunk/g10/keyring.c
===================================================================
--- trunk/g10/keyring.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/keyring.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -158,6 +158,8 @@
{
struct off_item *k;
+ (void)off;
+
for (k = tbl[(kid[1] & 0x07ff)]; k; k = k->next)
{
if (k->kid[0] == kid[0] && k->kid[1] == kid[1])
@@ -288,7 +290,7 @@
/*
- * Lock the keyring with the given handle, or unlok if yes is false.
+ * Lock the keyring with the given handle, or unlock if YES is false.
* We ignore the handle and lock all registered files.
*/
int
@@ -297,6 +299,8 @@
KR_NAME kr;
int rc = 0;
+ (void)hd;
+
if (yes) {
/* first make sure the lock handles are created */
for (kr=kr_names; kr; kr = kr->next) {
Modified: trunk/g10/misc.c
===================================================================
--- trunk/g10/misc.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/misc.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -121,7 +121,9 @@
sf->dev = buf.st_dev;
sf->next = secured_files;
secured_files = sf;
-#endif /*ENABLE_SELINUX_HACKS*/
+#else /*!ENABLE_SELINUX_HACKS*/
+ (void)fname;
+#endif /*!ENABLE_SELINUX_HACKS*/
}
/* Remove a file registered as secure. */
@@ -152,7 +154,9 @@
return;
}
}
-#endif /*ENABLE_SELINUX_HACKS*/
+#else /*!ENABLE_SELINUX_HACKS*/
+ (void)fname;
+#endif /*!ENABLE_SELINUX_HACKS*/
}
/* Return true if FD is corresponds to a secured file. Using -1 for
@@ -182,7 +186,9 @@
if (sf->ino == buf.st_ino && sf->dev == buf.st_dev)
return 1; /* Yes. */
}
-#endif /*ENABLE_SELINUX_HACKS*/
+#else /*!ENABLE_SELINUX_HACKS*/
+ (void)fd;
+#endif /*!ENABLE_SELINUX_HACKS*/
return 0; /* No. */
}
@@ -217,7 +223,9 @@
if (sf->ino == buf.st_ino && sf->dev == buf.st_dev)
return 1; /* Yes. */
}
-#endif /*ENABLE_SELINUX_HACKS*/
+#else /*!ENABLE_SELINUX_HACKS*/
+ (void)fname;
+#endif /*!ENABLE_SELINUX_HACKS*/
return 0; /* No. */
}
Modified: trunk/g10/parse-packet.c
===================================================================
--- trunk/g10/parse-packet.c 2008-10-19 16:10:46 UTC (rev 4854)
+++ trunk/g10/parse-packet.c 2008-10-20 13:53:23 UTC (rev 4855)
@@ -702,6 +702,8 @@
static int
parse_marker( IOBUF inp, int pkttype, unsigned long pktlen )
{
+ (void)pkttype;
+
if(pktlen!=3)
goto fail;
@@ -1661,8 +1663,8 @@
static int
-parse_key( IOBUF inp, int pkttype, unsigned long pktlen,
- byte *hdr, int hdrlen, PACKET *pkt )
+parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
+ byte *hdr, int hdrlen, PACKET *pkt)
{
int i, version, algorithm;
unsigned n;
@@ -1671,6 +1673,8 @@
int is_v4=0;
int rc=0;
+ (void)hdr;
+
version = iobuf_get_noeof(inp); pktlen--;
if( pkttype == PKT_PUBLIC_SUBKEY && version == '#' ) {
/* early versions of G10 use old PGP comments packets;
@@ -2170,6 +2174,8 @@
{
byte *p;
+ (void)pkttype;
+
#define EXTRA_UID_NAME_SPACE 71
packet->pkt.user_id = xmalloc_clear(sizeof *packet->pkt.user_id
+ EXTRA_UID_NAME_SPACE);
@@ -2237,6 +2243,8 @@
{
int c;
+ (void)pkttype;
+
if (pktlen)
{
c = iobuf_get_noeof(inp);
@@ -2332,20 +2340,22 @@
parse_compressed( IOBUF inp, int pkttype, unsigned long pktlen,
PACKET *pkt, int new_ctb )
{
- PKT_compressed *zd;
+ PKT_compressed *zd;
+
+ /* PKTLEN is here 0, but data follows (this should be the last
+ object in a file or the compress algorithm should know the
+ length). */
+ (void)pkttype;
+ (void)pktlen;
- /* pktlen is here 0, but data follows
- * (this should be the last object in a file or
- * the compress algorithm should know the length)
- */
- zd = pkt->pkt.compressed = xmalloc(sizeof *pkt->pkt.compressed );
- zd->algorithm = iobuf_get_noeof(inp);
- zd->len = 0; /* not used */
- zd->new_ctb = new_ctb;
- zd->buf = inp;
- if( list_mode )
- fprintf (listfp, ":compressed packet: algo=%d\n", zd->algorithm);
- return 0;
+ zd = pkt->pkt.compressed = xmalloc (sizeof *pkt->pkt.compressed);
+ zd->algorithm = iobuf_get_noeof(inp);
+ zd->len = 0; /* not used */
+ zd->new_ctb = new_ctb;
+ zd->buf = inp;
+ if (list_mode)
+ fprintf (listfp, ":compressed packet: algo=%d\n", zd->algorithm);
+ return 0;
}
More information about the Gnupg-commits
mailing list