This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.20-367-g0cd8552
- From: siddhesh at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 16 Dec 2014 14:11:35 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.20-367-g0cd8552
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 "GNU C Library master sources".
The branch, master has been updated
via 0cd8552045aeb0537b4f1ab5d1b30ada8ae50076 (commit)
from a0d424ef9d7fc34f7d1a516f38c8efb1e8692a03 (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0cd8552045aeb0537b4f1ab5d1b30ada8ae50076
commit 0cd8552045aeb0537b4f1ab5d1b30ada8ae50076
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Tue Dec 16 19:40:47 2014 +0530
Fix the 'array subscript is above array bounds' warning correctly
Use DIAG_IGNORE_NEEDS_COMMENT instead since the compiler should have
seen that NS never goes beyond MAXNS.
diff --git a/ChangeLog b/ChangeLog
index 2a3e0b7..fae86bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2014-12-16 Siddhesh Poyarekar <siddhesh@redhat.com>
+ * resolv/res_send.c (__libc_res_nsend): Disable warning 'array
+ subscript above bounds'
+
* resolv/res_send.c (__libc_res_nsend): Fix check for nsmap
bounds.
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 5a9882c..c35fb66 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -429,9 +429,15 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
while (ns < MAXNS
&& EXT(statp).nsmap[ns] != MAXNS)
ns++;
- if (ns >= MAXNS)
+ if (ns == MAXNS)
break;
+ /* NS never exceeds MAXNS, but gcc 4.9 somehow
+ does not see this. */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (4.9,
+ "-Warray-bounds");
EXT(statp).nsmap[ns] = n;
+ DIAG_POP_NEEDS_COMMENT;
map[n] = ns++;
}
EXT(statp).nscount = n;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 +++
resolv/res_send.c | 8 +++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources