lkml.org 
[lkml]   [2019]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] vhost: silence an unused-variable warning
From
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 6 Mar 2019 12:05:49 +0100

> On some architectures, the MMU can be disabled, leading to access_ok()
> becoming an empty macro that does not evaluate its size argument,
> which in turn produces an unused-variable warning:
>
> drivers/vhost/vhost.c:1191:9: error: unused variable 's' [-Werror,-Wunused-variable]
> size_t s = vhost_has_feature(vq, VIRTIO_RING_F_EVENT_IDX) ? 2 : 0;
>
> Mark the variable as __maybe_unused to shut up that warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I'll apply this, thanks Arnd.

\
 
 \ /
  Last update: 2019-03-09 00:18    [W:0.907 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site