From patchwork Wed Feb 28 08:00:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 878981 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 3zrp1h5nMJz9s2j for ; Wed, 28 Feb 2018 19:02:00 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 33DEAC26; Wed, 28 Feb 2018 08:01:54 +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 426989B9 for ; Wed, 28 Feb 2018 08:01:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A69A82F0 for ; Wed, 28 Feb 2018 08:01:51 +0000 (UTC) X-Originating-IP: 98.234.50.139 Received: from localhost.localdomain (unknown [98.234.50.139]) (Authenticated sender: jpettit@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id EC78D41C080 for ; Wed, 28 Feb 2018 09:01:49 +0100 (CET) From: Justin Pettit To: dev@openvswitch.org Date: Wed, 28 Feb 2018 00:00:55 -0800 Message-Id: <1519804863-73126-1-git-send-email-jpettit@ovn.org> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, TVD_SUBJ_WIPE_DEBT autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [shadow 0/8] Remove shadowed declarations 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: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The first eight patches in this series remove shadow declarations. I don't believe this series fixes any bugs, but we have had bugs introduced by shadow declarations in the past. The final patch adds the "-Wshadow" flag to supported compilers by default. Justin Pettit (8): Don't shadow global VLOG "rl" definition. cmap: Allow CMAP_FOR_EACH to be nested without shadowing variables. dp-packet: Add index to DP_PACKET_BATCH_FOR_EACH to prevent shadowing. Don't shadow iterator values. db-ctl-base: Don't shadow 'invalidate_cache' callback. ovs-numa: Prevent shadowing 'dummy_config'. Don't shadow variables. Add -Wshadow for compilers that support it. configure.ac | 1 + lib/cmap.h | 15 ++++++++-- lib/conntrack.c | 2 +- lib/daemon-unix.c | 62 ++++++++++++++++++++--------------------- lib/db-ctl-base.c | 8 +++--- lib/db-ctl-base.h | 2 +- lib/dp-packet.h | 16 +++++------ lib/dpif-netdev.c | 28 +++++++++---------- lib/netdev-dpdk.c | 2 +- lib/netdev-dummy.c | 2 +- lib/netdev-linux.c | 12 ++++---- lib/netdev.c | 2 +- lib/nx-match.c | 5 ++-- lib/odp-execute.c | 26 ++++++++--------- lib/ofp-actions.c | 18 ++++++------ lib/ofp-port.c | 4 +-- lib/ovs-numa.c | 34 +++++++--------------- lib/ovs-numa.h | 2 +- lib/route-table.c | 9 +++--- ofproto/connmgr.c | 4 +-- ofproto/ofproto-dpif-upcall.c | 65 ++++++++++++++++++++----------------------- ofproto/ofproto-dpif.c | 14 ++++------ ofproto/ofproto.c | 4 +-- ovn/controller/ofctrl.c | 12 ++++---- ovn/controller/pinctrl.c | 10 +++---- ovn/northd/ovn-northd.c | 8 +++--- tests/test-classifier.c | 4 +-- tests/test-conntrack.c | 20 ++++++------- utilities/ovs-ofctl.c | 24 ++++++++-------- 29 files changed, 201 insertions(+), 214 deletions(-)