This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.10-195-g666a987


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  666a9871f7afc40aebcc28eab8890ab99ee01a47 (commit)
      from  30a2dfd5181ab0fc61ef4f4ab5f7122e41a5ff50 (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=666a9871f7afc40aebcc28eab8890ab99ee01a47

commit 666a9871f7afc40aebcc28eab8890ab99ee01a47
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Thu Jul 23 12:53:50 2009 -0700

    Avoid warnings in test cases.
    
    The posix/tst-rfc3484* test cases caused warnings in newer gccs
    because the unused but copied sin_zero part of sockaddr_in wasn't
    explicitly initialized.

diff --git a/ChangeLog b/ChangeLog
index 79aeb83..7bc9fc3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
 
+	* posix/tst-rfc3484.c (do_test): Initialize entire sockaddr_in
+	structure before copying it to avoid warning.
+	* posix/tst-rfc3484-2.c (do_test): Likewise.
+	* posix/tst-rfc3484-3.c (do_test): Likewise.
+
 	[BZ #10416]
 	* include/unistd.h: Make header file suitable for C++ test cases.
 	Patch by Duncan Simpson <dps@simpson.demon.co.uk>.
diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
index c85fdd0..bf5f6cf 100644
--- a/posix/tst-rfc3484-2.c
+++ b/posix/tst-rfc3484-2.c
@@ -82,6 +82,8 @@ do_test (void)
   struct sockaddr_in so1;
   so1.sin_family = AF_INET;
   so1.sin_addr.s_addr = h (0xc0a85f19);
+  /* Clear the rest of the structure to avoid warnings.  */
+  memset (so1.sin_zero, '\0', sizeof (so1.sin_zero));
 
   struct sockaddr_in sa1;
   sa1.sin_family = AF_INET;
diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c
index 3aa4563..8eba74e 100644
--- a/posix/tst-rfc3484-3.c
+++ b/posix/tst-rfc3484-3.c
@@ -113,6 +113,8 @@ do_test (void)
   struct sockaddr_in so;
   so.sin_family = AF_INET;
   so.sin_addr.s_addr = h (0x0aa85f19);
+  /* Clear the rest of the structure to avoid warnings.  */
+  memset (so.sin_zero, '\0', sizeof (so.sin_zero));
 
   for (int i = 0; i < naddrs; ++i)
     {
diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
index 15d0c94..26835cf 100644
--- a/posix/tst-rfc3484.c
+++ b/posix/tst-rfc3484.c
@@ -102,6 +102,8 @@ do_test (void)
   struct sockaddr_in so;
   so.sin_family = AF_INET;
   so.sin_addr.s_addr = h (0xc0a85f19);
+  /* Clear the rest of the structure to avoid warnings.  */
+  memset (so.sin_zero, '\0', sizeof (so.sin_zero));
 
   for (int i = 0; i < naddrs; ++i)
     {

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

Summary of changes:
 ChangeLog             |    5 +++++
 posix/tst-rfc3484-2.c |    2 ++
 posix/tst-rfc3484-3.c |    2 ++
 posix/tst-rfc3484.c   |    2 ++
 4 files changed, 11 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]