Patchwork [v3] Avoid -Wall warnings in the testsuite

login
register
mail settings
Submitter Jonathan Wakely
Date June 22, 2011, 10:38 p.m.
Message ID <BANLkTimtwghORqvv9VO1c3OS-1sPq49bCw@mail.gmail.com>
Download mbox | patch
Permalink /patch/101558/
State New
Headers show

Comments

Jonathan Wakely - June 22, 2011, 10:38 p.m.
On 22 June 2011 22:48, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> ... all, besides that corresponding to c++/49508.
>
> Committed to mainline.
>
> Thanks,
> Paolo.
>
> //////////////////
>

Oops, this bit is my bad, I'll fix it:

I meant to use len, so the attribute isn't needed

Patch

Index: testsuite/20_util/bind/socket.cc
===================================================================
--- testsuite/20_util/bind/socket.cc	(revision 175315)
+++ testsuite/20_util/bind/socket.cc	(working copy)
@@ -35,7 +35,7 @@ 
 {
   int fd = 1;
   my_sockaddr sa;           // N.B. non-const
-  size_t len = sizeof(sa);  // N.B. size_t not socklen_t
+  size_t len __attribute__((unused)) = sizeof(sa); // N.B. size_t not socklen_t
   return bind(fd, &sa, sizeof(sa));
 }