]> git.proxmox.com Git - mirror_ovs.git/commit - lib/netdev-linux.c
Eliminate most shadowing for local variable names.
authorBen Pfaff <blp@ovn.org>
Wed, 2 Aug 2017 22:03:06 +0000 (15:03 -0700)
committerBen Pfaff <blp@ovn.org>
Wed, 2 Aug 2017 22:03:35 +0000 (15:03 -0700)
commit71f21279f62c2cca39ff1522f4d25b5de74992e3
treea97490d3be210eb0ae0813a2aea69ef160ffc57f
parentb24fa3f486d4061cb9facd181fd6234f281904df
Eliminate most shadowing for local variable names.

Shadowing is when a variable with a given name in an inner scope hides a
different variable with the same name in a surrounding scope.  This is
generally undesirable because it can confuse programmers.  This commit
eliminates most of it.

Found with -Wshadow=local in GCC 7.  The repo is not really ready to enable
this option by default because of a few cases that are harder to fix, and
harmless, such as nested use of CMAP_FOR_EACH.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
37 files changed:
lib/classifier.c
lib/daemon-unix.c
lib/db-ctl-base.c
lib/dpctl.c
lib/dpif-netdev.c
lib/hash.c
lib/learn.c
lib/lldp/lldpd.c
lib/netdev-dummy.c
lib/netdev-linux.c
lib/odp-util.c
lib/ofp-print.c
lib/ofp-util.c
lib/ovsdb-idl.c
lib/table.c
lib/unixctl.c
lib/vconn.c
lib/vlog.c
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c
ovn/controller/ofctrl.c
ovn/controller/patch.c
ovn/controller/physical.c
ovn/lib/expr.c
ovn/northd/ovn-northd.c
ovn/utilities/ovn-trace.c
ovsdb/jsonrpc-server.c
ovsdb/replication.c
tests/test-bundle.c
tests/test-ccmap.c
tests/test-classifier.c
tests/test-cmap.c
tests/test-odp.c
tests/test-ovn.c
utilities/ovs-vsctl.c
vswitchd/bridge.c
vtep/vtep-ctl.c