This driver has some unreachable code warnings in the base/ code.

The DQRR CFG register value in qm_dqrr_init() includes the terms
 "(0 ? 0x40 : 0) /* Ignore RP */" and
 "(0 ? 0x10 : 0) /* Ignore SP */",
which clang reports as unreachable code.

Both terms are always zero, so they contribute nothing to the
register value. They look like the remains of a configuration
macro that was replaced by its disabled value, leaving the
conditional behind. The same two lines appear unchanged in the
Linux kernel qbman driver, so this predates the DPDK import.

Signed-off-by: Stephen Hemminger <[email protected]>
---
 drivers/bus/dpaa/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/bus/dpaa/meson.build b/drivers/bus/dpaa/meson.build
index d1f03bb093..ef5e5721e5 100644
--- a/drivers/bus/dpaa/meson.build
+++ b/drivers/bus/dpaa/meson.build
@@ -22,6 +22,9 @@ sources = files(
         'dpaa_bus_base_symbols.c',
 )
 
+# base code in base/ has unreachable code, and is not built separately
+cflags += no_unreachable_cflag
+
 if cc.has_argument('-Wno-cast-qual')
     cflags += '-Wno-cast-qual'
 endif
-- 
2.53.0

Reply via email to