git: 6332ad8673fb - main - Fix unused variable warning in mlx5_fs_tree.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 22:40:43 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6332ad8673fb108dcb8af0aaa42d75ea845748d7 commit 6332ad8673fb108dcb8af0aaa42d75ea845748d7 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-24 22:09:33 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-24 22:40:13 +0000 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 --- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 2 -- 1 file changed, 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 749d128fe348..bc36b59fd555 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -1405,7 +1405,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; @@ -1442,7 +1441,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