clang-tidy 20.1.8 doesn't like (VHOST_USER_MAX_VQS / 2), because it expands
to (2 / 2). But in the context of the #define, this makes logical sense,
so suppress the warning.
I'm not sure why it isn't firing on the debug() line just below. Possibly
it only complains once per expression per function, so we only have to
suppress it once?
Signed-off-by: David Gibson
---
vhost_user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vhost_user.c b/vhost_user.c
index fa343a86..223332d5 100644
--- a/vhost_user.c
+++ b/vhost_user.c
@@ -939,6 +939,7 @@ static bool vu_get_queue_num_exec(struct vu_dev *vdev,
{
(void)vdev;
+ /* NOLINTNEXTLINE(misc-redundant-expression) */
vmsg_set_reply_u64(vmsg, VHOST_USER_MAX_VQS / 2);
debug("VHOST_USER_MAX_VQS %u", VHOST_USER_MAX_VQS / 2);
--
2.51.0