On Thu, 3 Sept 2026 at 21:16, Stephen Hemminger
<[email protected]> wrote:
>
> The vhost example tracks number of queues but never uses the
> variables. Remove num_queues and the num_vmdq_queues intermediate
> that only fed it.
>
> clang 23 reports:
> vhost/main.c:86:17: error: variable 'num_queues' set but not used
> [-Werror,-Wunused-but-set-global]
>
> Fixes: d19533e86f1d ("examples/vhost: copy old vhost example")
$ git grep num_queues 84b02d16c53981e9163a3f1600651a533770553a^ --
examples/vhost/main.c
84b02d16c53981e9163a3f1600651a533770553a^:examples/vhost/main.c:static
uint32_t num_queues = 0;
84b02d16c53981e9163a3f1600651a533770553a^:examples/vhost/main.c:
num_queues = dev_info.max_rx_queues;
84b02d16c53981e9163a3f1600651a533770553a^:examples/vhost/main.c:
rx_rings = (uint16_t)num_queues,
84b02d16c53981e9163a3f1600651a533770553a^:examples/vhost/main.c:
= dev->device_fh * (num_queues / num_devices);
$ git grep num_queues 84b02d16c53981e9163a3f1600651a533770553a --
examples/vhost/main.c
84b02d16c53981e9163a3f1600651a533770553a:examples/vhost/main.c:static
uint32_t num_queues = 0;
84b02d16c53981e9163a3f1600651a533770553a:examples/vhost/main.c:
num_queues = num_pf_queues + num_vmdq_queues;
The last usage of this variable was removed with:
Fixes: 84b02d16c539 ("examples/vhost: support new VMDQ API for i40e")
> Cc: [email protected]
>
> Signed-off-by: Stephen Hemminger <[email protected]>
Otherwise, lgtm.
--
David Marchand