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.16-ports-merge-791-ge10c4e4
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 29 Nov 2012 21:38:06 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.16-ports-merge-791-ge10c4e4
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 e10c4e4fdb3b90f398c0f26dde0143c2558834b5 (commit)
from 2af1b3285313519cc884fb86fdf61cbc77f92ea1 (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e10c4e4fdb3b90f398c0f26dde0143c2558834b5
commit e10c4e4fdb3b90f398c0f26dde0143c2558834b5
Author: Roland McGrath <roland@hack.frob.com>
Date: Thu Nov 29 13:35:14 2012 -0800
Fix a strict-alias warning in tst-inet6_rth.
diff --git a/ChangeLog b/ChangeLog
index 98f62bf..643a052 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-11-29 Roland McGrath <roland@hack.frob.com>
+
+ * inet/tst-inet6_rth.c (do_test): Use a union rather than type punning.
+
2012-11-28 Jeff Law <law@redhat.com>
[BZ #13761]
diff --git a/inet/tst-inet6_rth.c b/inet/tst-inet6_rth.c
index 4c5c90a..549d717 100644
--- a/inet/tst-inet6_rth.c
+++ b/inet/tst-inet6_rth.c
@@ -66,20 +66,24 @@ inet6_rth_segments returned wrong value after loop with third inet6_rth_add");
goto out;
}
- char buf2[1000];
- if (inet6_rth_reverse (p, buf2) != 0)
+ union
+ {
+ char buffer[1000];
+ struct ip6_rthdr0 rthdr0;
+ } buf2;
+ if (inet6_rth_reverse (p, buf2.buffer) != 0)
{
puts ("first inet6_rth_reverse call failed");
res = 1;
goto out;
}
- if (((struct ip6_rthdr0 *) buf2)->ip6r0_segleft != nseg)
+ if (buf2.rthdr0.ip6r0_segleft != nseg)
{
puts ("segleft after first inet6_rth_reverse wrong");
res = 1;
}
- if (inet6_rth_segments (p) != inet6_rth_segments (buf2))
+ if (inet6_rth_segments (p) != inet6_rth_segments (buf2.buffer))
{
puts ("number of seconds after first inet6_rth_reverse differs");
res = 1;
@@ -88,7 +92,7 @@ inet6_rth_segments returned wrong value after loop with third inet6_rth_add");
for (int i = 0; i < nseg; ++i)
{
- struct in6_addr *addr = inet6_rth_getaddr (buf2, i);
+ struct in6_addr *addr = inet6_rth_getaddr (buf2.buffer, i);
if (addr == NULL)
{
printf ("call %d of first inet6_rth_getaddr failed\n",
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
inet/tst-inet6_rth.c | 14 +++++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
hooks/post-receive
--
GNU C Library master sources