[PATCH 00/23] examples: enable -Wshadow across all examples

Bruce Richardson bruce.richardson at intel.com
Tue Apr 7 11:22:16 CEST 2026


On Mon, Apr 06, 2026 at 08:49:26PM -0700, Stephen Hemminger wrote:
> Several DPDK examples had -Wshadow disabled via no_shadow_cflag in
> their meson.build files. This series fixes all shadow variable
> warnings and removes the suppression flag, so that -Wshadow is
> enabled uniformly across every example.
> 
> The fixes fall into three categories:
>  - Renaming function parameters or local variables that shadow
>    globals (most patches)
>  - Removing unused function parameters that duplicated globals
>    (dma, bond, flow_filtering, ipsec-secgw, vhost, qos_sched)
>  - Simply removing no_shadow_cflag where there were no warnings
>    (vm_power_manage, bbdev_app, l2fwd-crypto, l2fwd-event,
>    l3fwd-graph)
> 
> All the patches are listed as fixes they are not worth
> back porting so no Fixes: tag is given.
> 
> Stephen Hemminger (23):
>   examples/ethtool: fix shadow variable warning
>   examples/eventdev_pipeline: fix shadow variable warning
>   examples/dma: fix shadow variable warnings
>   examples/packet_ordering: fix shadow variable warning
>   examples/bond: fix shadow variable warnings
>   examples/vmdq: fix shadow variable warning
>   examples/server_node_efd: fix shadowed variable
>   examples/flow_filtering: fix shadowed variables
>   examples/ipsec-secgw: fix shadowed variables
>   examples/ip_pipeline: fix shadow variable
>   examples/multi_process: fix shadowed variable
>   examples/vm_power_manage: enable shadow warnings
>   examples/bbdev_app: enable shadow warnings
>   examples/ptpclient: fix shadow variable warnings
>   examples/vhost: fix shadow warnings
>   examples/qos_sched: eliminate shadowed variables
>   examples/l2fwd-jobstats: fix shadowed variable
>   examples/l2fwd-crypto: remove no shadow flag
>   examples/l2fwd-event: remove no shadow flag
>   examples/l2fwd-keepalive: fix shadow variable warning
>   examples/l3fwd-graph: remove no shadow flag
>   examples/l3fwd: fix shadow variable warnings
>   examples/l3fwd-power: fix shadow variable warnings
> 

Thanks for the cleanup, Stephen.

Series-Acked-by: Bruce Richardson <bruce.richardson at intel.com>



More information about the dev mailing list