aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-24 22:09:33 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-27 19:21:13 +0000
commit8411ec0f213d20a4e6a72a2694190ea4bd3fff73 (patch)
tree11ec7e18f67614994e8fd0dfc82b4c9383ca5053
parentafe85e781b4f891eabe8c49f67c60f1d5bd148f6 (diff)
downloadsrc-8411ec0f213d20a4e6a72a2694190ea4bd3fff73.tar.gz
src-8411ec0f213d20a4e6a72a2694190ea4bd3fff73.zip
Fix unused variable warning in mlx5_fs_tree.c
With clang 15, the following -Werror warning is produced: sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c:1408:15: error: variable 'candidate_group_num' set but not used [-Werror,-Wunused-but-set-variable] unsigned int candidate_group_num = 0; ^ The 'candidate_group_num' variable appears to have been a debugging aid that has never been used for anything, so remove it. MFC after: 3 days (cherry picked from commit 6332ad8673fb108dcb8af0aaa42d75ea845748d7)
-rw-r--r--sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
index e7951682e56d..bb0cb5dad39f 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
@@ -1394,7 +1394,6 @@ static struct mlx5_flow_group *create_autogroup(struct mlx5_flow_table *ft,
{
unsigned int group_size;
unsigned int candidate_index = 0;
- unsigned int candidate_group_num = 0;
struct mlx5_flow_group *g;
struct mlx5_flow_group *ret;
struct list_head *prev = &ft->fgs;
@@ -1431,7 +1430,6 @@ static struct mlx5_flow_group *create_autogroup(struct mlx5_flow_table *ft,
/* sorted by start_index */
fs_for_each_fg(g, ft) {
- candidate_group_num++;
if (candidate_index + group_size > g->start_index)
candidate_index = g->start_index + g->max_ftes;
else