From patchwork Wed Jun 22 22:46:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 101559 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id BF1FAB6F6F for ; Thu, 23 Jun 2011 08:46:39 +1000 (EST) Received: (qmail 19030 invoked by alias); 22 Jun 2011 22:46:36 -0000 Received: (qmail 19013 invoked by uid 22791); 22 Jun 2011 22:46:35 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Jun 2011 22:46:19 +0000 Received: by pzk36 with SMTP id 36so874989pzk.20 for ; Wed, 22 Jun 2011 15:46:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.245.10 with SMTP id s10mr303600wfh.363.1308782779224; Wed, 22 Jun 2011 15:46:19 -0700 (PDT) Received: by 10.143.4.7 with HTTP; Wed, 22 Jun 2011 15:46:19 -0700 (PDT) In-Reply-To: References: <4E02633B.9020902@oracle.com> Date: Wed, 22 Jun 2011 23:46:19 +0100 Message-ID: Subject: Re: [v3] Avoid -Wall warnings in the testsuite From: Jonathan Wakely To: Paolo Carlini Cc: "gcc-patches@gcc.gnu.org" , "libstdc++" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 22 June 2011 23:38, Jonathan Wakely wrote: > On 22 June 2011 22:48, Paolo Carlini wrote: >> ... all, besides that corresponding to c++/49508. >> >> Committed to mainline. >> >> Thanks, >> Paolo. >> >> ////////////////// >> > > Oops, this bit is my bad, I'll fix it: > > 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)); >  } > > I meant to use len, so the attribute isn't needed 2011-06-22 Jonathan Wakely * testsuite/20_util/bind/socket.cc: Use variable and remove attribute. Tested (this test only) on x86_64-linux and committed to trunk. Index: testsuite/20_util/bind/socket.cc =================================================================== --- testsuite/20_util/bind/socket.cc (revision 175321) +++ 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 __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); }