From patchwork Tue Jan 6 16:45:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Bilka X-Patchwork-Id: 4529 Received: (qmail 24750 invoked by alias); 6 Jan 2015 16:45:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 24737 invoked by uid 89); 6 Jan 2015 16:45:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, SPF_NEUTRAL autolearn=no version=3.3.2 X-HELO: popelka.ms.mff.cuni.cz Date: Tue, 6 Jan 2015 17:45:32 +0100 From: =?utf-8?B?T25kxZllaiBCw61sa2E=?= To: Torvald Riegel Cc: GLIBC Devel Subject: Re: [PATCH] Ignore warning in string/tester.c. Message-ID: <20150106164532.GA25118@domone> References: <1418670947.7165.1.camel@triegel.csb> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1418670947.7165.1.camel@triegel.csb> User-Agent: Mutt/1.5.20 (2009-06-14) On Mon, Dec 15, 2014 at 08:15:47PM +0100, Torvald Riegel wrote: > This fixes a warning in a build using a fairly recent GCC. AFAIK the > warning/option is new and hasn't been offered by 4.9, hence the > conditional. OK? I also got warning in debian gcc-4.9 so I commited following as obvious. diff --git a/ChangeLog b/ChangeLog index 2edda5e..8f569ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * sysdeps/unix/sysv/linux/check_pf.c (make_request): Clean up check_pf allocation pattern. addresses + * string/tester.c (test_memset): Suppress warning for gcc 4.9 2015-01-06 Adhemerval Zanella diff --git a/string/tester.c b/string/tester.c index f957ed2..64dc056 100644 --- a/string/tester.c +++ b/string/tester.c @@ -1305,10 +1305,10 @@ test_memset (void) equal(one, "axxxefgh", 2); /* Basic test. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (5, 0) - /* GCC 5.0 warns about a zero-length memset because the arguments to memset +#if __GNUC_PREREQ (4, 9) + /* GCC 4.9 warns about a zero-length memset because the arguments to memset may be in the wrong order. But we really want to test this. */ - DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args") + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wmemset-transposed-args") #endif (void) memset(one+2, 'y', 0); equal(one, "axxxefgh", 3); /* Zero-length set. */