From patchwork Tue Mar 3 09:04:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1248152 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-520512-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=sInQ9hrM; dkim-atps=neutral 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 48Wrft043yz9sRf for ; Tue, 3 Mar 2020 20:04:19 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=EvPOCPyhGXtQORtMXEA5tI0Pvfpse/efv5/ii0T2dzit1ommcl KZ8Hp3XmzIsh0dsK0wJ35U0c4loTZUoJ32tJVgRGFXkCUil4ikCdUSYOzINibHSy rJAk5qPAoK7ZVtdDnchYT9HA/yr69kqgyZXCzsRXe29t4J/kwBAQp8zIw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=0fLYghVJyMxVpotI9ie21mtF9oU=; b=sInQ9hrMa0yVizIttxkb JhmYSJiplL4HASEovSqFZ7Pf+KHPzxOyaskGhO/ofxAPi6BbDWPNmZwiochhQXpZ 3kIhTUXWjcyNZYu4VA891oYzkYYQpHPKs/E7Cd1JSM9raaLth0/dUe/ftxhOllFf iJqO9MGWfVzkitk9u2Wb4Oc= Received: (qmail 42856 invoked by alias); 3 Mar 2020 09:04:12 -0000 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 Received: (qmail 42848 invoked by uid 89); 3 Mar 2020 09:04:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Mar 2020 09:04:10 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2D13DAFEC; Tue, 3 Mar 2020 09:04:08 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Wrap array in ctor with braces. To: gcc-patches@gcc.gnu.org Cc: Jason Merrill Message-ID: <11f9875a-d510-24fe-85a4-1d15797e3242@suse.cz> Date: Tue, 3 Mar 2020 10:04:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi. The patch is about to silent a few clang warnings: /home/marxin/Programming/gcc/gcc/cp/method.c:903:26: warning: suggest braces around initialization of subobject [-Wmissing-braces] { "partial_ordering", "equivalent", "greater", "less", "unordered" }, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { } /home/marxin/Programming/gcc/gcc/cp/method.c:904:23: warning: suggest braces around initialization of subobject [-Wmissing-braces] { "weak_ordering", "equivalent", "greater", "less" }, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { } /home/marxin/Programming/gcc/gcc/cp/method.c:905:25: warning: suggest braces around initialization of subobject [-Wmissing-braces] { "strong_ordering", "equal", "greater", "less" } ^~~~~~~~~~~~~~~~~~~~~~~~~~ { } Ready to be installed? Thanks, Martin gcc/cp/ChangeLog: 2020-03-03 Martin Liska * method.c: Wrap array in ctor with braces in order to silent clang warnings. --- gcc/cp/method.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 790d5704092..f10cfecaae8 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -900,9 +900,9 @@ struct comp_cat_info_t }; static const comp_cat_info_t comp_cat_info[cc_last] = { - { "partial_ordering", "equivalent", "greater", "less", "unordered" }, - { "weak_ordering", "equivalent", "greater", "less" }, - { "strong_ordering", "equal", "greater", "less" } + { "partial_ordering", { "equivalent", "greater", "less", "unordered" } }, + { "weak_ordering", { "equivalent", "greater", "less" } }, + { "strong_ordering", { "equal", "greater", "less" } } }; /* A cache of the category types to speed repeated lookups. */