The array of debug status strings did not match possible enum
values. Add the missing element and a static assert to make sure
the table has all possible values.

For more complete description see.
Link: https://pvs-studio.com/en/blog/posts/cpp/1176/

Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
Cc: rm...@marvell.com
Cc: sta...@dpdk.org

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 drivers/net/qede/qede_debug.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c
index 18f2d988fb..4997f98a5d 100644
--- a/drivers/net/qede/qede_debug.c
+++ b/drivers/net/qede/qede_debug.c
@@ -5614,6 +5614,8 @@ static const char * const s_status_str[] = {
        /* DBG_STATUS_INVALID_FILTER_TRIGGER_DWORDS */
        "The filter/trigger constraint dword offsets are not enabled for 
recording",
 
+       /* DBG_STATUS_NO_MATCHING_FRAMING_MODE */
+       "No matching frame mode",
 
        /* DBG_STATUS_VFC_READ_ERROR */
        "Error reading from VFC",
@@ -5759,6 +5761,7 @@ static const char * const s_status_str[] = {
        /* DBG_STATUS_MISSING_TRIGGER_STATE_STORM */
        "When triggering on Storm data, the Storm to trigger on must be 
specified"
 };
+static_assert(MAX_DBG_STATUS == RTE_DIM(s_status_str), "status string table 
mismatch");
 
 /* Idle check severity names array */
 static const char * const s_idle_chk_severity_str[] = {
-- 
2.45.2

Reply via email to