From 666a9871f7afc40aebcc28eab8890ab99ee01a47 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 23 Jul 2009 12:53:50 -0700 Subject: 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. --- posix/tst-rfc3484-2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'posix/tst-rfc3484-2.c') diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c index c85fdd0742..bf5f6cff7e 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; -- cgit v1.2.1