From patchwork Wed Aug 8 17:35:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 28795 Received: (qmail 101533 invoked by alias); 8 Aug 2018 17:35:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 101505 invoked by uid 89); 8 Aug 2018 17:35:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:1533742, H*f:sk:1533742, appended X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.39) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Aug 2018 17:35:54 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway31.websitewelcome.com (Postfix) with ESMTP id E74EFEE006 for ; Wed, 8 Aug 2018 12:35:52 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id nSMkf9KKVbXuJnSN2fYEg5; Wed, 08 Aug 2018 12:35:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=8kcD/XGlyHq6qjEdeNfU2JYrjGiSnjedvRLFBG9rImY=; b=fI2KmgKL5FNP76bJH2aDpJ+dsZ vVsTP9zstujwWOU+WPiVAP6/Pw40Orpsc98z5FnvgJcA2OAKzPsjbWpeJ5j9hF1DCInxqR3S/R7Kr 3gup40ZQBeZuLdoaycbS9+p5r; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:56664 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fnSMk-000bQr-3q; Wed, 08 Aug 2018 12:35:22 -0500 From: Tom Tromey To: Steve Ellcey Cc: gdb-patches , simon.marchi@ericsson.com Subject: Re: gdb build problem (gdb/unittests/scoped_mmap-selftests.c) References: <1533742957.31481.2.camel@cavium.com> Date: Wed, 08 Aug 2018 11:35:21 -0600 In-Reply-To: <1533742957.31481.2.camel@cavium.com> (Steve Ellcey's message of "Wed, 08 Aug 2018 08:42:37 -0700") Message-ID: <87wot092xy.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 >>>>> "Steve" == Steve Ellcey writes: Steve> Is anyone else still having a problem building gdb?  I saw the  Steve> mail about remote.c but I currently get this failure when Steve> building gdb with gcc 5.4.0 on an aarch64 linux box. I haven't seen this, but IIRC some distros enable _FORTIFY_SOURCE by default, which changes which unused-result warnings are emitted. Does the appended work for you? I wonder if we should enable _FORTIFY_SOURCE for development builds. Tom diff --git a/gdb/unittests/scoped_mmap-selftests.c b/gdb/unittests/scoped_mmap-selftests.c index d70a56a1862..e9d4afdffc5 100644 --- a/gdb/unittests/scoped_mmap-selftests.c +++ b/gdb/unittests/scoped_mmap-selftests.c @@ -91,7 +91,7 @@ test_normal () int fd = mkstemp (filename); SELF_CHECK (fd >= 0); - write (fd, "Hello!", 7); + SELF_CHECK (write (fd, "Hello!", 7) == 7); close (fd); gdb::unlinker unlink_test_file (filename);