Suppress compiler warnings

These warnings were detected with clang version 12.0.0.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Akihiko Odaki 3 years ago committed by Gert Wollny
parent 3b29b0723d
commit 9f6e5b9e9a
  1. 1
      src/virgl_util.c
  2. 2
      src/vrend_renderer.c
  3. 2
      vtest/vtest_shm.c

@ -81,6 +81,7 @@ int create_eventfd(unsigned int initval)
#ifdef HAVE_EVENTFD_H #ifdef HAVE_EVENTFD_H
return eventfd(initval, EFD_CLOEXEC | EFD_NONBLOCK); return eventfd(initval, EFD_CLOEXEC | EFD_NONBLOCK);
#else #else
(void)initval;
return -1; return -1;
#endif #endif
} }

@ -825,11 +825,13 @@ static inline bool vrend_format_can_scanout(enum virgl_formats format)
#endif #endif
} }
#ifdef ENABLE_MINIGBM_ALLOCATION
static inline bool vrend_format_can_texture_view(enum virgl_formats format) static inline bool vrend_format_can_texture_view(enum virgl_formats format)
{ {
return has_feature(feat_texture_view) && return has_feature(feat_texture_view) &&
tex_conv_table[format].flags & VIRGL_TEXTURE_CAN_TEXTURE_STORAGE; tex_conv_table[format].flags & VIRGL_TEXTURE_CAN_TEXTURE_STORAGE;
} }
#endif
struct vrend_context_tweaks *vrend_get_context_tweaks(struct vrend_context *ctx) struct vrend_context_tweaks *vrend_get_context_tweaks(struct vrend_context *ctx)
{ {

@ -38,6 +38,8 @@ static int memfd_create(const char *name, unsigned int flags)
#ifdef __NR_memfd_create #ifdef __NR_memfd_create
return syscall(__NR_memfd_create, name, flags); return syscall(__NR_memfd_create, name, flags);
#else #else
(void)name;
(void)flags;
return -1; return -1;
#endif #endif
} }

Loading…
Cancel
Save