From patchwork Mon Dec 15 19:15:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Torvald Riegel X-Patchwork-Id: 421561 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4AE6514009B for ; Tue, 16 Dec 2014 06:16:00 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:from:to:content-type:date:message-id :mime-version; q=dns; s=default; b=hpq2lLw1Q//P9ookpE5XSnw55vyZv 9muiRND9NJl+j3VG0SIhufrQsyH3UPnEltVaDv0BC486qxZqVnNKxdfVfe/WjaC+ FRC4YW10aSa1otRxnW7y4OkuIadthPA1VmEiabKLL9PFOkUsOSU1qJ+4ygRrK33z 0tL24TFnHaKyew= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:from:to:content-type:date:message-id :mime-version; s=default; bh=N7Qp08mDEiI7piP6l7A/vbQknsU=; b=V90 Vq9OzIWHkjnZlxD5pFB+p491eEfEaZ9Q+y0SVMLcFMWsGNNdDf4e6SF6MZXp0CCz 8nB0/TfJksH3m/NUb7obz1nzl+kLb8SwGB83iUcM1PFJR3Q9PPRXjAbYGSwEzKfV ODoVI9jpr86JiMIViGAiKpIitZp/iS/0kJgUfKAs= Received: (qmail 17184 invoked by alias); 15 Dec 2014 19:15:53 -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 17173 invoked by uid 89); 15 Dec 2014 19:15:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Subject: [PATCH] Ignore warning in string/tester.c. From: Torvald Riegel To: GLIBC Devel Date: Mon, 15 Dec 2014 20:15:47 +0100 Message-ID: <1418670947.7165.1.camel@triegel.csb> Mime-Version: 1.0 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? commit c489aa94f6e1721afa7e9e559fdb375587187590 Author: Torvald Riegel Date: Mon Dec 15 20:13:11 2014 +0100 Ignore warning in string/tester.c. diff --git a/string/tester.c b/string/tester.c index 62905a7..b219693 100644 --- a/string/tester.c +++ b/string/tester.c @@ -32,6 +32,7 @@ #include #include #include +#include #define STREQ(a, b) (strcmp((a), (b)) == 0) @@ -1303,8 +1304,15 @@ test_memset (void) check(memset(one+1, 'x', 3) == one+1, 1); /* Return value. */ 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 + may be in the wrong order. But we really want to test this. */ + DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args") +#endif (void) memset(one+2, 'y', 0); equal(one, "axxxefgh", 3); /* Zero-length set. */ + DIAG_POP_NEEDS_COMMENT; (void) memset(one+5, 0, 1); equal(one, "axxxe", 4); /* Zero fill. */