mirror of git://git.gnupg.org/gnupg.git
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@gnupg.org>
This commit is contained in:
parent
ebf775eb16
commit
40c307fa8d
|
@ -77,6 +77,7 @@ typedef int socket_fd_t;
|
||||||
#include <netdb.h> /* struct addrinfo */
|
#include <netdb.h> /* struct addrinfo */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gpgrt.h" /* For GGPRT_GCC_VERSION */
|
||||||
#include "dns.h"
|
#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
|
#if GPGRT_GCC_VERSION >= 80000
|
||||||
#pragma clang diagnostic ignored "-Warray-bounds"
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Warray-bounds"
|
||||||
|
#elif defined __clang__
|
||||||
|
# pragma clang diagnostic push
|
||||||
|
# pragma clang diagnostic ignored "-Warray-bounds"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int dns_so_tcp_send(struct dns_socket *so) {
|
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;
|
return 0;
|
||||||
} /* dns_so_tcp_recv() */
|
} /* dns_so_tcp_recv() */
|
||||||
|
|
||||||
#if __clang__
|
#if GPGRT_GCC_VERSION >= 80000
|
||||||
#pragma clang diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
|
#elif __clang__
|
||||||
|
# pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1885,8 +1885,8 @@ command_respond (void)
|
||||||
{
|
{
|
||||||
gpg_error_t err;
|
gpg_error_t err;
|
||||||
unsigned char *msg;
|
unsigned char *msg;
|
||||||
size_t msglen;
|
size_t msglen = 0; /* In case that read_message returns an error. */
|
||||||
int msgtype;
|
int msgtype = 0; /* ditto. */
|
||||||
nvc_t state;
|
nvc_t state;
|
||||||
const char *rolestr;
|
const char *rolestr;
|
||||||
const char *statestr;
|
const char *statestr;
|
||||||
|
|
Loading…
Reference in New Issue