The QoS sched example tracks numa and port mask but never
uses them. Remove the dead code.

clang 23 reports:
qos_sched/args.c:26:17: error: variable 'app_numa_mask' set but not used
         [-Werror,-Wunused-but-set-global]
qos_sched/args.c:27:17: error: variable 'app_used_port_mask' set but not used
        [-Werror,-Wunused-but-set-global]

Fixes: de3cfa2c9823 ("sched: initial import")
Cc: [email protected]

Signed-off-by: Stephen Hemminger <[email protected]>
---
 examples/qos_sched/args.c | 5 -----
 examples/qos_sched/init.c | 1 -
 2 files changed, 6 deletions(-)

diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index 886542b3c1..04e2a0e03c 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -23,8 +23,6 @@
 #define SYS_CPU_DIR "/sys/devices/system/cpu/cpu%u/topology/"
 
 static uint32_t app_main_core = 1;
-static uint32_t app_numa_mask;
-static uint64_t app_used_port_mask = 0;
 static uint64_t app_used_rx_port_mask = 0;
 static uint64_t app_used_tx_port_mask = 0;
 
@@ -214,7 +212,6 @@ app_parse_flow_conf(const char *conf_str)
                return -1;
        }
        app_used_rx_port_mask |= mask;
-       app_used_port_mask |= mask;
 
        mask = 1lu << pconf->tx_port;
        if (app_used_tx_port_mask & mask) {
@@ -223,7 +220,6 @@ app_parse_flow_conf(const char *conf_str)
                return -1;
        }
        app_used_tx_port_mask |= mask;
-       app_used_port_mask |= mask;
 
        nb_pfc++;
 
@@ -404,7 +400,6 @@ app_parse_args(int argc, char **argv)
                        RTE_LOG(ERR, APP, "pfc %u: RX and WT must be on the 
same socket\n", i + 1);
                        return -1;
                }
-               app_numa_mask |= 1 << 
rte_lcore_to_socket_id(qos_conf[i].rx_core);
        }
 
        return 0;
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 561f9e0619..9f4b2e0082 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -19,7 +19,6 @@
 #include "main.h"
 #include "cfg_file.h"
 
-uint32_t app_numa_mask = 0;
 static uint32_t app_inited_port_mask = 0;
 
 int app_pipe_to_profile[MAX_SCHED_SUBPORTS][MAX_SCHED_PIPES];
-- 
2.53.0

Reply via email to