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-3.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'posix/tst-rfc3484-3.c') 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) { -- cgit v1.1