diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-07-23 12:53:50 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-07-23 12:53:50 -0700 |
commit | 666a9871f7afc40aebcc28eab8890ab99ee01a47 (patch) | |
tree | e8e5b3415d2f93a960d9e6ea42e27c22af247a19 /posix/tst-rfc3484.c | |
parent | 30a2dfd5181ab0fc61ef4f4ab5f7122e41a5ff50 (diff) | |
download | glibc-666a9871f7afc40aebcc28eab8890ab99ee01a47.zip glibc-666a9871f7afc40aebcc28eab8890ab99ee01a47.tar.gz glibc-666a9871f7afc40aebcc28eab8890ab99ee01a47.tar.bz2 |
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.
Diffstat (limited to 'posix/tst-rfc3484.c')
-rw-r--r-- | posix/tst-rfc3484.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |