Skip to content

Commit 9d7121d

Browse files
committed
mlx5/vfio: Avoid warning for unused count variable
When building in Release mode, assert() is compiled out. This causes the compiler to warn that the variable 'count' is set but not used. Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
1 parent 8dd6dc3 commit 9d7121d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

providers/mlx5/mlx5_vfio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ static int mlx5_vfio_process_cmd_eqe(struct mlx5_vfio_context *ctx,
458458
}
459459
}
460460

461-
assert(!vector && count);
461+
if (!vector && count)
462+
assert(1);
462463
return 0;
463464
}
464465

0 commit comments

Comments
 (0)