[{"id":1759548,"web_url":"http://patchwork.ozlabs.org/comment/1759548/","msgid":"<6d3e9768-9770-9268-479f-75c4eac52c31@gmail.com>","list_archive_url":null,"date":"2017-08-29T17:06:54","subject":"Re: [ovs-dev] [PATCH] sparse: eliminate \"duplicate initialization\"\n\twarning","submitter":{"id":69140,"url":"http://patchwork.ozlabs.org/api/people/69140/","name":"Gregory Rose","email":"gvrose8192@gmail.com"},"content":"On 08/28/2017 08:23 AM, Lance Richardson wrote:\n> Sparse version 0.5.1 will be released in the near future. Prepare\n> for it by eliminating the only new warning (as of 0.5.1-rc5):\n>\n> ofproto/fail-open.c:134:22: error: Initializer entry defined twice\n> ofproto/fail-open.c:135:22:   also defined here\n>\n> MATCH_CATCHALL_INITIALIZER effectively sets all fields of .flow to\n> zero, which is redundant because according to the C99 semantics for\n> structure initialization, initializing any single member of a\n> structure results in all other members being initialized to zero,\n> and the next line initializes a member of the same structure.\n>\n> Signed-off-by: Lance Richardson <lrichard@redhat.com>\n> ---\n>   ofproto/fail-open.c | 1 -\n>   1 file changed, 1 deletion(-)\n>\n> diff --git a/ofproto/fail-open.c b/ofproto/fail-open.c\n> index 914a51b4b..819bdadc3 100644\n> --- a/ofproto/fail-open.c\n> +++ b/ofproto/fail-open.c\n> @@ -131,7 +131,6 @@ send_bogus_packet_ins(struct fail_open *fo)\n>                   .base = {\n>                       .packet = dp_packet_data(&b),\n>                       .packet_len = dp_packet_size(&b),\n> -                    .flow_metadata = MATCH_CATCHALL_INITIALIZER,\n>                       .flow_metadata.flow.in_port.ofp_port = OFPP_LOCAL,\n>                       .flow_metadata.wc.masks.in_port.ofp_port\n>                       = u16_to_ofp(UINT16_MAX),\n>\nReviewed-by: Greg Rose <gvrose8192@gmail.com>","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fQ6e1o1+\"; dkim-atps=neutral"],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhZn22lc6z9t3J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 03:07:02 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id E2C3693E;\n\tTue, 29 Aug 2017 17:06:58 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 335DF5AA\n\tfor <dev@openvswitch.org>; Tue, 29 Aug 2017 17:06:58 +0000 (UTC)","from mail-pg0-f65.google.com (mail-pg0-f65.google.com\n\t[74.125.83.65])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id D6A80F8\n\tfor <dev@openvswitch.org>; Tue, 29 Aug 2017 17:06:57 +0000 (UTC)","by mail-pg0-f65.google.com with SMTP id r133so3154624pgr.2\n\tfor <dev@openvswitch.org>; Tue, 29 Aug 2017 10:06:57 -0700 (PDT)","from gizo.bigblue.kilchis.com (67-5-157-64.ptld.qwest.net.\n\t[67.5.157.64]) by smtp.gmail.com with ESMTPSA id\n\tu83sm6038691pfd.159.2017.08.29.10.06.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 10:06:55 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:references:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=jSECn/T+3ep17eVk5sVV+jMRU6APa4u4bBGvC/xAQw8=;\n\tb=fQ6e1o1+7jfqfrELQAL/d4IgeKbeDuGguzqUAfmR/lgEbXwz0tV2P801Q4fsOQYqeR\n\tvwYl7KjcmjGZuaMiyv0DcddtS1FT4S4I3qurwzRhF+WDiz2he/n9PoCHkP2ASRE4jRvu\n\tg0IYk4arBbPXJw5eRSoW35nlgP1PSk15DLYT3Mg7+D1enEKo1Q2dE/iXfigUaurtA/3B\n\tNRw2f63wabj05c/8H9HDeDiK9DIftAOgdMwdtASP/NHTj0YCGDfwUageN817nRAkXaAp\n\t/UXs/UGu9RNPdQ/6kgGJQ5zvnDfgt8FgGGpaWtbSYMHmscT0L9rLutdoUn4426hZ6fQh\n\t/9fg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:references:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=jSECn/T+3ep17eVk5sVV+jMRU6APa4u4bBGvC/xAQw8=;\n\tb=sWzj00AZ1dl9Z+NwZoWc6au8HUwpf221aL2gz18KD6Koq0YszDd5Qw/jy3oen39crk\n\tvBEBtl/6IE5XtdD5GNjq3WZ6lFZUg6LERCNT4sW+2LhDBXSUn8onsT1WfhkeyNRmhUoo\n\tL8cG6rJF6JTfoaruqXZgXb8iwU1ZtyKaMge5YP02WxAZevPF3rUGVKNS+m1Rc6jAlV14\n\tH4PvBdBwwg4WAhQG+asMd+57bq6QEYwQgXiaJ0s4QhOvY4LBPmyHoQMMWdKRb0tseyaD\n\tJO2n6V98BPg3qZ190xwLsfRt1W5jJPH6dLNw3H9tObiElcSCaB4TtHbm39/8WIqlySK7\n\tcdbg==","X-Gm-Message-State":"AHYfb5gNBsnkj3+21irRpNjSkZ5ecaz5zGMlC1aFiXwpk/UH/sH7zNRP\n\tefaC5Hgaa/pUN3sH/Qg=","X-Received":"by 10.99.122.82 with SMTP id j18mr979188pgn.20.1504026417259;\n\tTue, 29 Aug 2017 10:06:57 -0700 (PDT)","From":"Greg Rose <gvrose8192@gmail.com>","To":"Lance Richardson <lrichard@redhat.com>","References":"<20170828152316.9690-1-lrichard@redhat.com>","Message-ID":"<6d3e9768-9770-9268-479f-75c4eac52c31@gmail.com>","Date":"Tue, 29 Aug 2017 10:06:54 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.1.0","MIME-Version":"1.0","In-Reply-To":"<20170828152316.9690-1-lrichard@redhat.com>","X-Spam-Status":"No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, \n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"dev@openvswitch.org","Subject":"Re: [ovs-dev] [PATCH] sparse: eliminate \"duplicate initialization\"\n\twarning","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1796348,"web_url":"http://patchwork.ozlabs.org/comment/1796348/","msgid":"<20171030235004.GR27530@ovn.org>","list_archive_url":null,"date":"2017-10-30T23:50:04","subject":"Re: [ovs-dev] [PATCH] sparse: eliminate \"duplicate initialization\"\n\twarning","submitter":{"id":67603,"url":"http://patchwork.ozlabs.org/api/people/67603/","name":"Ben Pfaff","email":"blp@ovn.org"},"content":"On Tue, Aug 29, 2017 at 10:06:54AM -0700, Greg Rose wrote:\n> On 08/28/2017 08:23 AM, Lance Richardson wrote:\n> >Sparse version 0.5.1 will be released in the near future. Prepare\n> >for it by eliminating the only new warning (as of 0.5.1-rc5):\n> >\n> >ofproto/fail-open.c:134:22: error: Initializer entry defined twice\n> >ofproto/fail-open.c:135:22:   also defined here\n> >\n> >MATCH_CATCHALL_INITIALIZER effectively sets all fields of .flow to\n> >zero, which is redundant because according to the C99 semantics for\n> >structure initialization, initializing any single member of a\n> >structure results in all other members being initialized to zero,\n> >and the next line initializes a member of the same structure.\n> >\n> >Signed-off-by: Lance Richardson <lrichard@redhat.com>\n> >---\n> >  ofproto/fail-open.c | 1 -\n> >  1 file changed, 1 deletion(-)\n> >\n> >diff --git a/ofproto/fail-open.c b/ofproto/fail-open.c\n> >index 914a51b4b..819bdadc3 100644\n> >--- a/ofproto/fail-open.c\n> >+++ b/ofproto/fail-open.c\n> >@@ -131,7 +131,6 @@ send_bogus_packet_ins(struct fail_open *fo)\n> >                  .base = {\n> >                      .packet = dp_packet_data(&b),\n> >                      .packet_len = dp_packet_size(&b),\n> >-                    .flow_metadata = MATCH_CATCHALL_INITIALIZER,\n> >                      .flow_metadata.flow.in_port.ofp_port = OFPP_LOCAL,\n> >                      .flow_metadata.wc.masks.in_port.ofp_port\n> >                      = u16_to_ofp(UINT16_MAX),\n> >\n> Reviewed-by: Greg Rose <gvrose8192@gmail.com>\n\nThanks Lance and Greg, I applied this to master and branch-2.8.","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yQrnf6Pj8z9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 31 Oct 2017 10:50:14 +1100 (AEDT)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id E3B55D71;\n\tMon, 30 Oct 2017 23:50:12 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 4E921D16\n\tfor <dev@openvswitch.org>; Mon, 30 Oct 2017 23:50:11 +0000 (UTC)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id EFF8751F\n\tfor <dev@openvswitch.org>; Mon, 30 Oct 2017 23:50:10 +0000 (UTC)","from ovn.org (unknown [208.91.3.26])\n\t(Authenticated sender: blp@ovn.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 0C59CC5A5A;\n\tTue, 31 Oct 2017 00:50:07 +0100 (CET)"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Originating-IP":"208.91.3.26","Date":"Mon, 30 Oct 2017 16:50:04 -0700","From":"Ben Pfaff <blp@ovn.org>","To":"Greg Rose <gvrose8192@gmail.com>","Message-ID":"<20171030235004.GR27530@ovn.org>","References":"<20170828152316.9690-1-lrichard@redhat.com>\n\t<6d3e9768-9770-9268-479f-75c4eac52c31@gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<6d3e9768-9770-9268-479f-75c4eac52c31@gmail.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-Spam-Status":"No, score=-0.2 required=5.0 tests=RCVD_IN_DNSWL_LOW,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"dev@openvswitch.org, Lance Richardson <lrichard@redhat.com>","Subject":"Re: [ovs-dev] [PATCH] sparse: eliminate \"duplicate initialization\"\n\twarning","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}}]