@@ -96,6 +96,7 @@ static const char rcsid[] = "$BINDId: res_send.c,v 8.38 2000/03/30 20:16:51 vixi
#include <string.h>
#include <unistd.h>
#include <kernel-features.h>
+#include <libc-internal.h>
#if PACKETSZ > 65536
#define MAXPACKET PACKETSZ
@@ -668,7 +669,17 @@ send_vc(res_state statp,
// int anssiz = *anssizp;
HEADER *anhp = (HEADER *) ans;
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
- int truncating, connreset, resplen, n;
+ int truncating, connreset, n;
+ /* There´s the following warning on S390:
+ ‘resplen’ may be used uninitialized in this function
+ [-Wmaybe-uninitialized]
+ This is a false positive according to:
+ https://www.sourceware.org/ml/libc-alpha/2014-12/msg00323.html
+ */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
+ int resplen;
+ DIAG_POP_NEEDS_COMMENT;
struct iovec iov[4];
u_short len;
u_short len2;
@@ -788,8 +799,11 @@ send_vc(res_state statp,
reply. We can try to use the rest
of the user-provided buffer. */
#if _STRING_ARCH_unaligned
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
*anssizp2 = orig_anssizp - resplen;
*ansp2 = *ansp + resplen;
+ DIAG_POP_NEEDS_COMMENT;
#else
int aligned_resplen
= ((resplen + __alignof__ (HEADER) - 1)