socket.cc: Use variable and remove attribute.
authorJonathan Wakely <jwakely.gcc@gmail.com>
Wed, 22 Jun 2011 22:46:14 +0000 (22:46 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 22 Jun 2011 22:46:14 +0000 (23:46 +0100)
2011-06-22  Jonathan Wakely  <jwakely.gcc@gmail.com>

* testsuite/20_util/bind/socket.cc: Use variable and remove attribute.

From-SVN: r175322

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/bind/socket.cc

index 7cbae95f394b3d0363127cfcbafe4a04129914ab..200c28653c98e9d5b8b089f21ab5a96dae4537d2 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * testsuite/20_util/bind/socket.cc: Use variable and remove attribute.
+
 2011-06-22  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Avoid -Wall
index 041100f85c21eb474a8ad69487ac2739367157c6..c5019215c02581fc9d68d9eb8a32778e4fa311c3 100644 (file)
@@ -35,7 +35,7 @@ int test01()
 {
   int fd = 1;
   my_sockaddr sa;           // N.B. non-const
-  size_t len __attribute__((unused)) = sizeof(sa); // N.B. size_t not socklen_t
-  return bind(fd, &sa, sizeof(sa));
+  size_t len = sizeof(sa);  // N.B. size_t not my_socklen_t
+  return bind(fd, &sa, len);
 }