Commit af4a5da8 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Paolo Abeni
Browse files

pktgen: avoid unused-const-variable warning



When extra warnings are enable, there are configurations that build
pktgen without CONFIG_XFRM, which leaves a static const variable unused:

net/core/pktgen.c:213:1: error: unused variable 'F_IPSEC' [-Werror,-Wunused-const-variable]
  213 | PKT_FLAGS
      | ^~~~~~~~~
net/core/pktgen.c:197:2: note: expanded from macro 'PKT_FLAGS'
  197 |         pf(IPSEC)               /* ipsec on for flows */                \
      |         ^~~~~~~~~

This could be marked as __maybe_unused, or by making the one use visible
to the compiler by slightly rearranging the #ifdef blocks. The second
variant looks slightly nicer here, so use that.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarPeter Seiderer <ps.report@gmx.net>
Link: https://patch.msgid.link/20250225085722.469868-1-arnd@kernel.org


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 0493f7a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment