diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index 4de897a6b..33e3ec3c6 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -717,6 +717,8 @@ setup_qualitybar (ctrl_t ctrl) char *tmpstr, *tmpstr2; const char *tooltip; + (void)ctrl; + /* TRANSLATORS: This string is displayed by Pinentry as the label for the quality bar. */ tmpstr = try_percent_escape (L_("Quality:"), "\t\r\n\f\v"); diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 3a5abbba4..04b03d390 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -1178,7 +1178,9 @@ main (int argc, char **argv ) gnupg_fd_t fd_extra = GNUPG_INVALID_FD; gnupg_fd_t fd_browser = GNUPG_INVALID_FD; gnupg_fd_t fd_ssh = GNUPG_INVALID_FD; +#ifndef HAVE_W32_SYSTEM pid_t pid; +#endif /* Remove the DISPLAY variable so that a pinentry does not default to a specific display. There is still a default @@ -1237,7 +1239,6 @@ main (int argc, char **argv ) #ifdef HAVE_W32_SYSTEM (void)csh_style; (void)nodetach; - pid = getpid (); #else /*!HAVE_W32_SYSTEM*/ pid = fork (); if (pid == (pid_t)-1) diff --git a/common/iobuf.c b/common/iobuf.c index d49de9695..e8b4a034e 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -267,6 +267,7 @@ direct_open (const char *fname, const char *mode, int mode700) unsigned long da, cd, sm; HANDLE hfile; + (void)mode700; /* Note, that we do not handle all mode combinations */ /* According to the ReactOS source it seems that open() of the @@ -2271,8 +2272,6 @@ iobuf_set_limit (iobuf_t a, off_t nlimit) off_t iobuf_get_filelength (iobuf_t a, int *overflow) { - struct stat st; - if (overflow) *overflow = 0; @@ -2330,11 +2329,15 @@ iobuf_get_filelength (iobuf_t a, int *overflow) } log_error ("GetFileSize for handle %p failed: %s\n", fp, w32_strerror (0)); -#else - if ( !fstat (FD2INT (fp), &st) ) - return st.st_size; - log_error("fstat() failed: %s\n", strerror(errno) ); -#endif +#else /*!HAVE_W32_SYSTEM*/ + { + struct stat st; + + if ( !fstat (FD2INT (fp), &st) ) + return st.st_size; + log_error("fstat() failed: %s\n", strerror(errno) ); + } +#endif /*!HAVE_W32_SYSTEM*/ } return 0; diff --git a/common/w32-afunix.h b/common/w32-afunix.h index f6282a3dd..7025a4914 100644 --- a/common/w32-afunix.h +++ b/common/w32-afunix.h @@ -38,7 +38,7 @@ #include /* We can easiliy replace this code by the socket wrappers from libassuan. */ -#warning Please do not use this module anymore +#warning Remove this code; it is only used on w32 by symcryptrun. #define DIRSEP_C '\\' diff --git a/g10/keylist.c b/g10/keylist.c index 031612cd2..58c0a9699 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -870,7 +870,7 @@ list_keyblock_pka (ctrl_t ctrl, kbnode_t keyblock) char pkstrbuf[PUBKEY_STRING_SIZE]; char *hexfpr; char *hexkeyblock = NULL; - unsigned int hexkeyblocklen; + unsigned int hexkeyblocklen = 0; /* Init to avoid -Wmaybe-uninitialized. */ const char *s; /* Get the keyid from the keyblock. */ diff --git a/g10/trustdb.c b/g10/trustdb.c index 386796c68..fbb806d85 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -992,9 +992,16 @@ tdb_get_validity_core (PKT_public_key *pk, PKT_user_id *uid, TRUSTREC trec, vrec; gpg_error_t err; ulong recno; +#ifdef USE_TOFU unsigned int tofu_validity = TRUST_UNKNOWN; +#endif unsigned int validity = TRUST_UNKNOWN; +#ifndef USE_TOFU + (void)sig; + (void)may_ask; +#endif + init_trustdb (); /* If we have no trustdb (which also means it has not been created)