Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2022 19:21:26 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 8411ec0f213d - stable/12 - Fix unused variable warning in mlx5_fs_tree.c
Message-ID:  <202207271921.26RJLQvS071632@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=8411ec0f213d20a4e6a72a2694190ea4bd3fff73

commit 8411ec0f213d20a4e6a72a2694190ea4bd3fff73
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:21: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
    
    (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 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207271921.26RJLQvS071632>