From patchwork Fri Jul 13 17:16:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 28386 Received: (qmail 47445 invoked by alias); 13 Jul 2018 17:16:18 -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 47425 invoked by uid 89); 13 Jul 2018 17:16:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.7 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= X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.54.2) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Jul 2018 17:16:16 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 5913E400CC7D4 for ; Fri, 13 Jul 2018 12:16:13 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id e1fuf9TP4SjJAe1fvfxHFA; Fri, 13 Jul 2018 12:16:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=wXNDWnrn1GyGC+rt0Weg567ecwu7sViFJjr7rRh8uqU=; b=uuK2KsH8ytdoWYeGKjMxdma2xT 31colN+jxQsvAHlsLgmVPkGa6U44xls8BRNz9XokN8vlSrKSVVXJSOSl+xvE89OCYRKAljPXfBpWS VvD9D22Nr+3+cf8jtgs2pwtiN; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:34104 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fe1fu-000kgi-Cp; Fri, 13 Jul 2018 12:16:10 -0500 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [RFA] Make macOS build warning-free References: <20180629165453.22888-1-tom@tromey.com> <87woudofal.fsf@tromey.com> <5f9b4ce1-aa8d-30e3-98f9-f2c36c3869c6@simark.ca> Date: Fri, 13 Jul 2018 11:16:09 -0600 In-Reply-To: <5f9b4ce1-aa8d-30e3-98f9-f2c36c3869c6@simark.ca> (Simon Marchi's message of "Mon, 2 Jul 2018 12:53:09 -0400") Message-ID: <87k1pzawfa.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 >>>>> "Simon" == Simon Marchi writes: >> I think in the meantime I'll just --disable-nls. Perhaps you wouldn't >> mind approving the symfile.c change in isolation. Simon> That bit looks good to me, at least to shut up the compiler. I forgot about this for a while, but here is the patch I am checking in. Tom commit 027a4c30d03e3f434ddfa61e7f026e3b15f83daa Author: Tom Tromey Date: Fri Jul 13 11:14:57 2018 -0600 Remove a warning on macOS This removes a clang warning coming from -Wmissing-braces. ChangeLog 2018-07-13 Tom Tromey * symfile.c (set_objfile_default_section_offset): Use extra braces around initializer. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7b808eb3a76..66b7c3681e2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-07-13 Tom Tromey + + * symfile.c (set_objfile_default_section_offset): Use extra braces + around initializer. + 2018-07-13 Andreas Arnez * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a diff --git a/gdb/symfile.c b/gdb/symfile.c index 48eca5cc0ea..62b38bd6182 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2088,7 +2088,7 @@ set_objfile_default_section_offset (struct objfile *objf, { /* Add OFFSET to all sections by default. */ std::vector offsets (objf->num_sections, - { offset }); + { { offset } }); /* Create sorted lists of all sections in ADDRS as well as all sections in OBJF. */