core: Mark unused function args.
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
9064eebdc0
commit
4a200146b6
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
@ -131,6 +131,7 @@ llass_get_home_dir (void)
|
||||
static char *
|
||||
llass_get_version (const char *file_name)
|
||||
{
|
||||
(void)file_name;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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. */
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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 ();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user