From 9f6e5b9e9ad3ba0915e33c18042b6d33304628a6 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 23 Jun 2021 05:34:27 +0900 Subject: [PATCH] Suppress compiler warnings These warnings were detected with clang version 12.0.0. Signed-off-by: Akihiko Odaki Reviewed-by: Gert Wollny --- src/virgl_util.c | 1 + src/vrend_renderer.c | 2 ++ src/vrend_winsys.c | 2 +- vtest/vtest_shm.c | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/virgl_util.c b/src/virgl_util.c index 6dead0a..0ed3d22 100644 --- a/src/virgl_util.c +++ b/src/virgl_util.c @@ -81,6 +81,7 @@ int create_eventfd(unsigned int initval) #ifdef HAVE_EVENTFD_H return eventfd(initval, EFD_CLOEXEC | EFD_NONBLOCK); #else + (void)initval; return -1; #endif } diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 25bc69b..63f0b0e 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -825,11 +825,13 @@ static inline bool vrend_format_can_scanout(enum virgl_formats format) #endif } +#ifdef ENABLE_MINIGBM_ALLOCATION static inline bool vrend_format_can_texture_view(enum virgl_formats format) { return has_feature(feat_texture_view) && tex_conv_table[format].flags & VIRGL_TEXTURE_CAN_TEXTURE_STORAGE; } +#endif struct vrend_context_tweaks *vrend_get_context_tweaks(struct vrend_context *ctx) { diff --git a/src/vrend_winsys.c b/src/vrend_winsys.c index bf2d9ef..669af81 100644 --- a/src/vrend_winsys.c +++ b/src/vrend_winsys.c @@ -230,4 +230,4 @@ bool vrend_winsys_different_gpu(void) return virgl_egl_different_gpu(egl); #endif return false; -} \ No newline at end of file +} diff --git a/vtest/vtest_shm.c b/vtest/vtest_shm.c index 50cffea..efaad8a 100644 --- a/vtest/vtest_shm.c +++ b/vtest/vtest_shm.c @@ -38,6 +38,8 @@ static int memfd_create(const char *name, unsigned int flags) #ifdef __NR_memfd_create return syscall(__NR_memfd_create, name, flags); #else + (void)name; + (void)flags; return -1; #endif }