[Pkg-gnupg-commit] [gpgme] 345/412: core: Mark unused function args.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Sep 22 21:27:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gpgme.

commit 4a200146b602349eebb4eac2e102357748d7ba5b
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Sep 13 20:53:14 2016 +0200

    core: Mark unused function args.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 src/assuan-support.c  | 17 +++++++++++++++++
 src/data-identify.c   |  2 ++
 src/delete.c          |  2 ++
 src/engine-assuan.c   |  1 +
 src/engine-g13.c      |  3 +++
 src/engine-gpg.c      |  6 ++++++
 src/engine-gpgconf.c  |  2 ++
 src/engine-gpgsm.c    |  9 +++++++++
 src/engine-uiserver.c |  5 +++++
 src/getauditlog.c     |  3 +++
 src/gpgme-tool.c      | 18 ++++++++++++++++++
 src/keylist.c         |  2 ++
 src/op-support.c      |  2 ++
 src/posix-util.c      |  2 ++
 src/trustlist.c       |  3 +++
 src/verify.c          |  2 ++
 src/version.c         |  2 +-
 src/vfs-create.c      |  2 ++
 src/vfs-mount.c       |  2 ++
 src/wait-user.c       |  2 ++
 20 files changed, 86 insertions(+), 1 deletion(-)

diff --git a/src/assuan-support.c b/src/assuan-support.c
index 745d2aa..2cfdc35 100644
--- a/src/assuan-support.c
+++ b/src/assuan-support.c
@@ -26,6 +26,10 @@ int
 _gpgme_assuan_log_cb (assuan_context_t ctx, void *hook,
 		      unsigned int cat, const char *msg)
 {
+  (void)ctx;
+  (void)hook;
+  (void)cat;
+
   if (msg == NULL)
     return 1;
 
@@ -49,6 +53,8 @@ my_pipe (assuan_context_t ctx, assuan_fd_t fds[2], int inherit_idx)
   int res;
   int gfds[2];
 
+  (void)ctx;
+
   res = _gpgme_io_pipe (gfds, inherit_idx);
 
   /* For now... */
@@ -64,6 +70,7 @@ my_pipe (assuan_context_t ctx, assuan_fd_t fds[2], int inherit_idx)
 static int
 my_close (assuan_context_t ctx, assuan_fd_t fd)
 {
+  (void)ctx;
   return _gpgme_io_close ((int) fd);
 }
 
@@ -71,6 +78,7 @@ my_close (assuan_context_t ctx, assuan_fd_t fd)
 static gpgme_ssize_t
 my_read (assuan_context_t ctx, assuan_fd_t fd, void *buffer, size_t size)
 {
+  (void)ctx;
   return _gpgme_io_read ((int) fd, buffer, size);
 }
 
@@ -78,6 +86,7 @@ my_read (assuan_context_t ctx, assuan_fd_t fd, void *buffer, size_t size)
 static gpgme_ssize_t
 my_write (assuan_context_t ctx, assuan_fd_t fd, const void *buffer, size_t size)
 {
+  (void)ctx;
   return _gpgme_io_write ((int) fd, buffer, size);
 }
 
@@ -86,6 +95,7 @@ static int
 my_recvmsg (assuan_context_t ctx, assuan_fd_t fd, assuan_msghdr_t msg,
 	    int flags)
 {
+  (void)ctx;
 #ifdef HAVE_W32_SYSTEM
   gpg_err_set_errno (ENOSYS);
   return -1;
@@ -100,6 +110,7 @@ static int
 my_sendmsg (assuan_context_t ctx, assuan_fd_t fd, const assuan_msghdr_t msg,
 	    int flags)
 {
+  (void)ctx;
 #ifdef HAVE_W32_SYSTEM
   gpg_err_set_errno (ENOSYS);
   return -1;
@@ -124,6 +135,9 @@ my_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
   struct spawn_fd_item_s *fd_items;
   int i;
 
+  (void)ctx;
+  (void)flags;
+
   assert (name);
 
   if (! name)
@@ -194,6 +208,7 @@ static pid_t
 my_waitpid (assuan_context_t ctx, pid_t pid,
 	    int nowait, int *status, int options)
 {
+  (void)ctx;
 #ifdef HAVE_W32_SYSTEM
   CloseHandle ((HANDLE) pid);
 #else
@@ -226,6 +241,7 @@ my_socketpair (assuan_context_t ctx, int namespace, int style,
 static int
 my_socket (assuan_context_t ctx, int namespace, int style, int protocol)
 {
+  (void)ctx;
   return _gpgme_io_socket (namespace, style, protocol);
 }
 
@@ -234,6 +250,7 @@ static int
 my_connect (assuan_context_t ctx, int sock, struct sockaddr *addr,
 	    socklen_t length)
 {
+  (void)ctx;
   return _gpgme_io_connect (sock, addr, length);
 }
 
diff --git a/src/data-identify.c b/src/data-identify.c
index 1edfb9b..a5da7f5 100644
--- a/src/data-identify.c
+++ b/src/data-identify.c
@@ -489,6 +489,8 @@ gpgme_data_identify (gpgme_data_t dh, int reserved)
   int n;
   gpgme_off_t off;
 
+  (void)reserved;
+
   /* Check whether we can seek the data object.  */
   off = gpgme_data_seek (dh, 0, SEEK_CUR);
   if (off == (gpgme_off_t)(-1))
diff --git a/src/delete.c b/src/delete.c
index d7fdf50..fc99aac 100644
--- a/src/delete.c
+++ b/src/delete.c
@@ -33,6 +33,8 @@
 static gpgme_error_t
 delete_status_handler (void *priv, gpgme_status_code_t code, char *args)
 {
+  (void)priv;
+
   if (code == GPGME_STATUS_DELETE_PROBLEM)
     {
       enum delete_problem
diff --git a/src/engine-assuan.c b/src/engine-assuan.c
index c4a84a3..1f48173 100644
--- a/src/engine-assuan.c
+++ b/src/engine-assuan.c
@@ -131,6 +131,7 @@ llass_get_home_dir (void)
 static char *
 llass_get_version (const char *file_name)
 {
+  (void)file_name;
   return NULL;
 }
 
diff --git a/src/engine-g13.c b/src/engine-g13.c
index afb085d..ce98b1b 100644
--- a/src/engine-g13.c
+++ b/src/engine-g13.c
@@ -413,6 +413,9 @@ g13_assuan_simple_command (assuan_context_t ctx, char *cmd,
   char *line;
   size_t linelen;
 
+  (void)status_fnc;
+  (void)status_fnc_value;
+
   err = assuan_write_line (ctx, cmd);
   if (err)
     return err;
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index c528d05..7270e36 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -2540,6 +2540,8 @@ gpg_keylist (void *engine, const char *pattern, int secret_only,
   engine_gpg_t gpg = engine;
   gpgme_error_t err;
 
+  (void)engine_flags;
+
   err = gpg_keylist_build_options (gpg, secret_only, mode);
 
   if (!err && pattern && *pattern)
@@ -2559,6 +2561,8 @@ gpg_keylist_ext (void *engine, const char *pattern[], int secret_only,
   engine_gpg_t gpg = engine;
   gpgme_error_t err;
 
+  (void)engine_flags;
+
   if (reserved)
     return gpg_error (GPG_ERR_INV_VALUE);
 
@@ -2585,6 +2589,8 @@ gpg_sign (void *engine, gpgme_data_t in, gpgme_data_t out,
   engine_gpg_t gpg = engine;
   gpgme_error_t err;
 
+  (void)include_certs;
+
   if (mode == GPGME_SIG_MODE_CLEAR)
     err = add_arg (gpg, "--clearsign");
   else
diff --git a/src/engine-gpgconf.c b/src/engine-gpgconf.c
index 2e25d76..d5e7e2b 100644
--- a/src/engine-gpgconf.c
+++ b/src/engine-gpgconf.c
@@ -912,6 +912,8 @@ gpgconf_conf_save (void *engine, gpgme_conf_comp_t comp)
 static void
 gpgconf_set_io_cbs (void *engine, gpgme_io_cbs_t io_cbs)
 {
+  (void)engine;
+  (void)io_cbs;
   /* Nothing to do.  */
 }
 
diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c
index 81e8fab..1cf5046 100644
--- a/src/engine-gpgsm.c
+++ b/src/engine-gpgsm.c
@@ -185,6 +185,8 @@ close_notify_handler (int fd, void *opaque)
 static gpgme_error_t
 default_inq_cb (engine_gpgsm_t gpgsm, const char *line)
 {
+  (void)gpgsm;
+
   if (!strncmp (line, "PINENTRY_LAUNCHED", 17) && (line[17]==' '||!line[17]))
     {
       _gpgme_allow_set_foreground_window ((pid_t)strtoul (line+17, NULL, 10));
@@ -660,6 +662,9 @@ gpgsm_clear_fd (engine_gpgsm_t gpgsm, fd_type_t fd_type)
       _gpgme_io_close (gpgsm->message_cb.fd);
       break;
     }
+#else
+  (void)gpgsm;
+  (void)fd_type;
 #endif
 }
 
@@ -1133,6 +1138,8 @@ gpgsm_delete (void *engine, gpgme_key_t key, int allow_secret)
   char *line;
   int length = 8;	/* "DELKEYS " */
 
+  (void)allow_secret;
+
   if (!fpr)
     return gpg_error (GPG_ERR_INV_VALUE);
 
@@ -1816,6 +1823,8 @@ gpgsm_sign (void *engine, gpgme_data_t in, gpgme_data_t out,
   int i;
   gpgme_key_t key;
 
+  (void)use_textmode;
+
   if (!gpgsm)
     return gpg_error (GPG_ERR_INV_VALUE);
 
diff --git a/src/engine-uiserver.c b/src/engine-uiserver.c
index 2ed7825..215dbe3 100644
--- a/src/engine-uiserver.c
+++ b/src/engine-uiserver.c
@@ -187,6 +187,8 @@ close_notify_handler (int fd, void *opaque)
 static gpgme_error_t
 default_inq_cb (engine_uiserver_t uiserver, const char *line)
 {
+  (void)uiserver;
+
   if (!strncmp (line, "PINENTRY_LAUNCHED", 17) && (line[17]==' '||!line[17]))
     {
       _gpgme_allow_set_foreground_window ((pid_t)strtoul (line+17, NULL, 10));
@@ -1151,6 +1153,9 @@ uiserver_sign (void *engine, gpgme_data_t in, gpgme_data_t out,
   char *cmd;
   gpgme_key_t key;
 
+  (void)use_textmode;
+  (void)include_certs;
+
   if (!uiserver || !in || !out)
     return gpg_error (GPG_ERR_INV_VALUE);
   if (uiserver->protocol == GPGME_PROTOCOL_DEFAULT)
diff --git a/src/getauditlog.c b/src/getauditlog.c
index 3bb4138..e2ba25e 100644
--- a/src/getauditlog.c
+++ b/src/getauditlog.c
@@ -31,6 +31,9 @@
 static gpgme_error_t
 getauditlog_status_handler (void *priv, gpgme_status_code_t code, char *args)
 {
+  (void)priv;
+  (void)code;
+  (void)args;
   return 0;
 }
 
diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c
index ec85039..80d7d72 100644
--- a/src/gpgme-tool.c
+++ b/src/gpgme-tool.c
@@ -1809,6 +1809,8 @@ server_passphrase_cb (void *opaque, const char *uid_hint, const char *info,
   unsigned char *buf = NULL;
   size_t buflen = 0;
 
+  (void)was_bad;
+
   if (server && server->assuan_ctx)
     {
       if (uid_hint)
@@ -1983,6 +1985,9 @@ static gpg_error_t
 reset_notify (assuan_context_t ctx, char *line)
 {
   struct server *server = assuan_get_pointer (ctx);
+
+  (void)line;
+
   server_reset_fds (server);
   gt_reset (server->gt);
   return 0;
@@ -2306,6 +2311,8 @@ cmd_signers_clear (assuan_context_t ctx, char *line)
 {
   struct server *server = assuan_get_pointer (ctx);
 
+  (void)line;
+
   return gt_signers_clear (server->gt);
 }
 
@@ -2322,6 +2329,8 @@ _cmd_decrypt_verify (assuan_context_t ctx, char *line, int verify)
   gpgme_data_t inp_data;
   gpgme_data_t out_data;
 
+  (void)line;
+
   inp_fd = server->input_fd;
   inp_fn = server->input_filename;
   if (inp_fd == ASSUAN_INVALID_FD && !inp_fn)
@@ -2548,6 +2557,8 @@ cmd_verify (assuan_context_t ctx, char *line)
   gpgme_data_t msg_data = NULL;
   gpgme_data_t out_data = NULL;
 
+  (void)line;
+
   inp_fd = server->input_fd;
   inp_fn = server->input_filename;
   if (inp_fd == ASSUAN_INVALID_FD && !inp_fn)
@@ -2723,6 +2734,8 @@ cmd_genkey (assuan_context_t ctx, char *line)
   gpgme_data_t parms_data = NULL;
   const char *parms;
 
+  (void)line;
+
   inp_fd = server->input_fd;
   inp_fn = server->input_filename;
   if (inp_fd == ASSUAN_INVALID_FD && !inp_fn)
@@ -3038,6 +3051,9 @@ static gpg_error_t
 cmd_result (assuan_context_t ctx, char *line)
 {
   struct server *server = assuan_get_pointer (ctx);
+
+  (void)line;
+
   return gt_result (server->gt, GT_RESULT_ALL);
 }
 
@@ -3093,6 +3109,8 @@ cmd_identify (assuan_context_t ctx, char *line)
   char *inp_fn;
   gpgme_data_t inp_data;
 
+  (void)line;
+
   inp_fd = server->input_fd;
   inp_fn = server->input_filename;
   if (inp_fd == ASSUAN_INVALID_FD && !inp_fn)
diff --git a/src/keylist.c b/src/keylist.c
index f7912e6..8a0c5a3 100644
--- a/src/keylist.c
+++ b/src/keylist.c
@@ -122,6 +122,8 @@ keylist_status_handler (void *priv, gpgme_status_code_t code, char *args)
   void *hook;
   op_data_t opd;
 
+  (void)args;
+
   err = _gpgme_op_data_lookup (ctx, OPDATA_KEYLIST, &hook, -1, NULL);
   opd = hook;
   if (err)
diff --git a/src/op-support.c b/src/op-support.c
index a74405e..9f10cd3 100644
--- a/src/op-support.c
+++ b/src/op-support.c
@@ -213,6 +213,8 @@ _gpgme_parse_inv_recp (char *args, int for_signing,
   char *tail;
   long int reason;
 
+  (void)for_signing;
+
   inv_key = calloc (1, sizeof (*inv_key));
   if (!inv_key)
     return gpg_error_from_syserror ();
diff --git a/src/posix-util.c b/src/posix-util.c
index 0fce5c2..889c6aa 100644
--- a/src/posix-util.c
+++ b/src/posix-util.c
@@ -145,6 +145,8 @@ _gpgme_get_gpgconf_path (void)
 int
 _gpgme_get_conf_int (const char *key, int *value)
 {
+  (void)key;
+  (void)value;
   return 0;
 }
 
diff --git a/src/trustlist.c b/src/trustlist.c
index d456780..c85ef87 100644
--- a/src/trustlist.c
+++ b/src/trustlist.c
@@ -52,6 +52,9 @@ typedef struct
 static gpgme_error_t
 trustlist_status_handler (void *priv, gpgme_status_code_t code, char *args)
 {
+  (void)priv;
+  (void)code;
+  (void)args;
   return 0;
 }
 
diff --git a/src/verify.c b/src/verify.c
index 5ac937d..6bdbe66 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -1264,6 +1264,8 @@ gpgme_get_sig_ulong_attr (gpgme_ctx_t ctx, int idx,
   gpgme_verify_result_t result;
   gpgme_signature_t sig;
 
+  (void)whatidx;
+
   result = gpgme_op_verify_result (ctx);
   sig = result->signatures;
 
diff --git a/src/version.c b/src/version.c
index e2f1c35..a9bf7b8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -307,7 +307,7 @@ _gpgme_get_program_version (const char *const file_name)
   char *mark = NULL;
   int rp[2];
   int nread;
-  char *argv[] = {NULL /* file_name */, "--version", 0};
+  char *argv[] = {NULL /* file_name */, (char*)"--version", 0};
   struct spawn_fd_item_s cfd[] = { {-1, 1 /* STDOUT_FILENO */, -1, 0},
 				   {-1, -1} };
   int status;
diff --git a/src/vfs-create.c b/src/vfs-create.c
index 48931b9..a01d4da 100644
--- a/src/vfs-create.c
+++ b/src/vfs-create.c
@@ -118,6 +118,8 @@ _gpgme_op_vfs_create (gpgme_ctx_t ctx, gpgme_key_t recp[],
   char *container_file_esc = NULL;
   int i;
 
+  (void)flags;
+
   /* We want to encourage people to check error values, so not getting
      them is discouraged here.  Also makes our code easier.  */
   if (! op_err)
diff --git a/src/vfs-mount.c b/src/vfs-mount.c
index b9b1b4d..5d2f2a9 100644
--- a/src/vfs-mount.c
+++ b/src/vfs-mount.c
@@ -173,6 +173,8 @@ _gpgme_op_vfs_mount (gpgme_ctx_t ctx, const char *container_file,
   char *cmd;
   char *container_file_esc = NULL;
 
+  (void)flags;
+
   /* We want to encourage people to check error values, so not getting
      them is discouraged here.  Also makes our code easier.  */
   if (! op_err)
diff --git a/src/wait-user.c b/src/wait-user.c
index ba28761..c7bc80f 100644
--- a/src/wait-user.c
+++ b/src/wait-user.c
@@ -46,6 +46,8 @@ _gpgme_user_io_cb_handler (void *data, int fd)
   struct tag *tag = (struct tag *) data;
   gpgme_ctx_t ctx;
 
+  (void)fd;
+
   assert (data);
   ctx = tag->ctx;
   assert (ctx);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git



More information about the Pkg-gnupg-commit mailing list