diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2025-10-02 15:04:32 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-10-07 15:33:14 +0200 |
commit | b4b3b082e37698aa8daeb043d070ee40844d9598 (patch) | |
tree | 69724ef1cb436d4e1136010cde313abb2725990c | |
parent | 4d9c35b17589c5b50ed413860c9e5836a515170e (diff) | |
download | passt-b4b3b082e37698aa8daeb043d070ee40844d9598.tar passt-b4b3b082e37698aa8daeb043d070ee40844d9598.tar.gz passt-b4b3b082e37698aa8daeb043d070ee40844d9598.tar.bz2 passt-b4b3b082e37698aa8daeb043d070ee40844d9598.tar.lz passt-b4b3b082e37698aa8daeb043d070ee40844d9598.tar.xz passt-b4b3b082e37698aa8daeb043d070ee40844d9598.tar.zst passt-b4b3b082e37698aa8daeb043d070ee40844d9598.zip |
clang-tidy: Suppress redundant expression warning
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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | vhost_user.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vhost_user.c b/vhost_user.c index fa343a8..223332d 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); |