git: afbb64817633 - stable/13 - Fix unused variable warning in mlx5_fs_tree.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Jul 2022 19:18:01 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=afbb64817633d8f7d1d45152e46bd708e0183d15
commit afbb64817633d8f7d1d45152e46bd708e0183d15
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-24 22:09:33 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-27 19:16:22 +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
(cherry picked from commit 6332ad8673fb108dcb8af0aaa42d75ea845748d7)
---
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 9568f23d5b8c..86cffe67583d 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c
@@ -1407,7 +1407,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;
@@ -1444,7 +1443,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