Skip to contentSkip to conversation

net/mlx4: unreachable code warnings

DPDK/ethdev Bug 2139 [email protected] 1 participant 1 message Nov 17

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=2139

            Bug ID: 2139
           Summary: net/mlx4: unreachable code warnings
           Product: DPDK
           Version: 26.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

Building with clang and -Wunreachable-code generates warning:
../drivers/net/mlx4/mlx4_flow.c:761:4: warning: code will never be executed [-Wunreachable-code]

  761 |                         const struct rte_flow_action_queue *queue;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 warning generated.

This is caused by putting declarations at start of switch block. They need to be moved up to fix the warning.

Clang is being overly picky in this case, but worth shutting up the warning

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.