[Pkg-gnupg-commit] [gnupg2] 191/241: Silence unused variable or parameter warnings.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Dec 9 20:32:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 022342e2845834ec35269d23491e9fa573d5c028
Author: Werner Koch <wk at gnupg.org>
Date: Fri Nov 27 17:53:52 2015 +0100
Silence unused variable or parameter warnings.
--
---
agent/call-pinentry.c | 2 ++
agent/gpg-agent.c | 3 ++-
common/iobuf.c | 17 ++++++++++-------
common/w32-afunix.h | 2 +-
g10/keylist.c | 2 +-
g10/trustdb.c | 7 +++++++
6 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 4de897a..33e3ec3 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 3a5abbb..04b03d3 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 d49de96..e8b4a03 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 f6282a3..7025a49 100644
--- a/common/w32-afunix.h
+++ b/common/w32-afunix.h
@@ -38,7 +38,7 @@
#include <unistd.h>
/* 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 031612c..58c0a96 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 386796c..fbb806d 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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list