mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
agent,dirmngr,gpg,scd: Clean up for modern compiler.
* agent/protect.c (agent_get_shadow_info_type): It's a write only variable, useful for debugging. * g10/key-check.c (key_check_all_keysigs): Likewise. * g10/keyedit.c (show_basic_key_info, menu_expire): Likewise. * scd/app-sc-hsm.c (read_ef_prkd): Likewise. * dirmngr/crlfetch.c (fetch_next_ksba_cert): Initialize the vars. * dirmngr/ks-action.c (ks_action_help): Remove unused variables. * dirmngr/server.c (make_keyserver_item): Likewise. * dirmngr/validate.c (check_cert_sig): Initialize the variable. * scd/app-p15.c (select_and_read_record): Likewise. * tests/gpgscm/scheme.c (scheme_init_new): A function with no args. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
e133bcb1cd
commit
3d7dbf1661
@ -1632,6 +1632,7 @@ agent_get_shadow_info_type (const unsigned char *shadowkey,
|
||||
size_t n, saved_n;
|
||||
int depth = 0;
|
||||
|
||||
(void)depth;
|
||||
s = shadowkey;
|
||||
if (*s != '(')
|
||||
return gpg_error (GPG_ERR_INV_SEXP);
|
||||
|
@ -366,8 +366,8 @@ gpg_error_t
|
||||
fetch_next_ksba_cert (cert_fetch_context_t context, ksba_cert_t *r_cert)
|
||||
{
|
||||
gpg_error_t err;
|
||||
unsigned char *value;
|
||||
size_t valuelen;
|
||||
unsigned char *value = NULL;
|
||||
size_t valuelen = 0;
|
||||
ksba_cert_t cert;
|
||||
|
||||
*r_cert = NULL;
|
||||
|
@ -67,8 +67,6 @@ ks_action_help (ctrl_t ctrl, const char *url)
|
||||
{
|
||||
gpg_error_t err;
|
||||
parsed_uri_t parsed_uri; /* The broken down URI. */
|
||||
char *tmpstr;
|
||||
const char *s;
|
||||
|
||||
if (!url || !*url)
|
||||
{
|
||||
|
@ -2126,7 +2126,6 @@ make_keyserver_item (const char *uri, uri_item_t *r_item)
|
||||
{
|
||||
gpg_error_t err;
|
||||
uri_item_t item;
|
||||
const char *s;
|
||||
char *tmpstr = NULL;
|
||||
|
||||
*r_item = NULL;
|
||||
|
@ -950,7 +950,8 @@ check_cert_sig (ksba_cert_t issuer_cert, ksba_cert_t cert)
|
||||
int algo;
|
||||
ksba_sexp_t p;
|
||||
size_t n;
|
||||
gcry_sexp_t s_sig, s_hash, s_pkey;
|
||||
gcry_sexp_t s_sig, s_pkey;
|
||||
gcry_sexp_t s_hash = NULL;
|
||||
const char *algo_name; /* hash algorithm name converted to lower case. */
|
||||
int digestlen;
|
||||
unsigned char *digest;
|
||||
|
@ -261,6 +261,7 @@ key_check_all_keysigs (ctrl_t ctrl, int mode, kbnode_t kb,
|
||||
int modified = 0;
|
||||
PKT_signature *sig;
|
||||
|
||||
(void)missing_selfsig;
|
||||
log_assert (kb->pkt->pkttype == PKT_PUBLIC_KEY);
|
||||
pk = kb->pkt->pkt.public_key;
|
||||
|
||||
|
@ -4069,6 +4069,7 @@ show_basic_key_info (ctrl_t ctrl, kbnode_t keyblock, int print_sec)
|
||||
}
|
||||
|
||||
/* The user IDs. */
|
||||
(void)i; /* Counting User IDs */
|
||||
for (i = 0, node = keyblock; node; node = node->next)
|
||||
{
|
||||
if (node->pkt->pkttype == PKT_USER_ID)
|
||||
@ -4768,6 +4769,7 @@ menu_expire (ctrl_t ctrl, kbnode_t pub_keyblock,
|
||||
kbnode_t node;
|
||||
u32 keyid[2];
|
||||
|
||||
(void)signumber;
|
||||
if (unattended)
|
||||
{
|
||||
only_mainkey = (unattended == 1);
|
||||
|
@ -708,7 +708,7 @@ select_and_read_record (app_t app, unsigned short efid, int recno,
|
||||
unsigned char **buffer, size_t *buflen, int *r_sw)
|
||||
{
|
||||
gpg_error_t err;
|
||||
int sw;
|
||||
int sw = 0;
|
||||
|
||||
if (r_sw)
|
||||
*r_sw = 0x9000;
|
||||
|
@ -666,6 +666,7 @@ read_ef_prkd (app_t app, unsigned short fid, prkdf_object_t *prkdresult,
|
||||
{
|
||||
/* Yep, this is the keyReference.
|
||||
Note: UL is currently not used. */
|
||||
(void)ul;
|
||||
for (ul=0; objlen; objlen--)
|
||||
{
|
||||
ul <<= 8;
|
||||
|
@ -5569,7 +5569,7 @@ static const struct scheme_interface vtbl = {
|
||||
};
|
||||
#endif
|
||||
|
||||
scheme *scheme_init_new() {
|
||||
scheme *scheme_init_new(void) {
|
||||
scheme *sc=(scheme*)malloc(sizeof(scheme));
|
||||
if(!scheme_init(sc)) {
|
||||
free(sc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user