[git] GnuPG - branch, master, updated. gnupg-2.2.7-309-g40c307f

by Werner Koch cvs at cvs.gnupg.org
Mon Dec 17 18:46:35 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  40c307fa8d0e813f2aa57806f25b8b0063cc2be3 (commit)
      from  ebf775eb16fef27bd1f27319a5483d04dcf95a9a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 40c307fa8d0e813f2aa57806f25b8b0063cc2be3
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Dec 17 18:46:26 2018 +0100

    Silence a few compiler warnings new with gcc 8.
    
    * dirmngr/dns.c: Include gpgrt.h.  Silence -Warray-bounds also gcc.
    * tools/gpg-pair-tool.c (command_respond): Init two vars to silence
    gcc.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/dirmngr/dns.c b/dirmngr/dns.c
index 596e81f..210e9f4 100644
--- a/dirmngr/dns.c
+++ b/dirmngr/dns.c
@@ -77,6 +77,7 @@ typedef int socket_fd_t;
 #include <netdb.h>		/* struct addrinfo */
 #endif
 
+#include "gpgrt.h"   /* For GGPRT_GCC_VERSION */
 #include "dns.h"
 
 
@@ -7521,9 +7522,13 @@ static unsigned char *dns_so_tcp_recv_buffer(struct dns_socket *so) {
 }
 
 
-#if defined __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Warray-bounds"
+
+#if GPGRT_GCC_VERSION >= 80000
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#elif defined __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Warray-bounds"
 #endif
 
 static int dns_so_tcp_send(struct dns_socket *so) {
@@ -7589,8 +7594,10 @@ static int dns_so_tcp_recv(struct dns_socket *so) {
 	return 0;
 } /* dns_so_tcp_recv() */
 
-#if __clang__
-#pragma clang diagnostic pop
+#if GPGRT_GCC_VERSION >= 80000
+# pragma GCC diagnostic pop
+#elif __clang__
+# pragma clang diagnostic pop
 #endif
 
 
diff --git a/tools/gpg-pair-tool.c b/tools/gpg-pair-tool.c
index a86bd8e..347b29d 100644
--- a/tools/gpg-pair-tool.c
+++ b/tools/gpg-pair-tool.c
@@ -1885,8 +1885,8 @@ command_respond (void)
 {
   gpg_error_t err;
   unsigned char *msg;
-  size_t msglen;
-  int msgtype;
+  size_t msglen = 0; /* In case that read_message returns an error.  */
+  int msgtype = 0;   /* ditto.  */
   nvc_t state;
   const char *rolestr;
   const char *statestr;

-----------------------------------------------------------------------

Summary of changes:
 dirmngr/dns.c         | 17 ++++++++++++-----
 tools/gpg-pair-tool.c |  4 ++--
 2 files changed, 14 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list