From patchwork Tue Jul 31 16:57:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 951704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41g2gl75Pgz9s2g for ; Wed, 1 Aug 2018 02:58:10 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 3B8C7D15; Tue, 31 Jul 2018 16:58:07 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 2213ACB4 for ; Tue, 31 Jul 2018 16:58:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D408B7A4 for ; Tue, 31 Jul 2018 16:58:04 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id EE7E424000A; Tue, 31 Jul 2018 16:58:01 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 31 Jul 2018 09:57:58 -0700 Message-Id: <20180731165758.17130-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] ofctrl: Placate GCC. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Some GCC versions don't like ".x.y =", complaining about an uninitialized field. Without this patch we get travis failures, e.g. https://travis-ci.org/openvswitch/ovs/jobs/410404752: ovn/controller/ofctrl.c: In function ‘ofctrl_put’: ovn/controller/ofctrl.c:1086:9: error: missing initializer for field ‘flags’ of ‘struct ofputil_meter_config’ [-Werror=missing-field-initializers] }; ^ In file included from ovn/controller/ofctrl.c:35:0: ./include/openvswitch/ofp-meter.h:53:14: note: ‘flags’ declared here uint16_t flags; ^ With it, it passes. Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- ovn/controller/ofctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovn/controller/ofctrl.c b/ovn/controller/ofctrl.c index d2afd08129a2..96c57f143843 100644 --- a/ovn/controller/ofctrl.c +++ b/ovn/controller/ofctrl.c @@ -1082,7 +1082,7 @@ ofctrl_put(struct hmap *flow_table, struct shash *pending_ct_zones, /* Delete the meter. */ struct ofputil_meter_mod mm = { .command = OFPMC13_DELETE, - .meter.meter_id = m_installed->table_id, + .meter = { .meter_id = m_installed->table_id }, }; add_meter_mod(&mm, &msgs);