From f6d31cf8f7f06c61859b0391b6326b3abdd9adc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 3 Dec 2019 16:50:22 +0400 Subject: [PATCH] Fix some -Wpedantic warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: warning: ISO C forbids ‘return’ with expression, in function returning void Signed-off-by: Marc-André Lureau Reviewed-by: Gert Wollny --- src/virglrenderer.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/virglrenderer.c b/src/virglrenderer.c index dd39d40..50611c4 100644 --- a/src/virglrenderer.c +++ b/src/virglrenderer.c @@ -161,7 +161,7 @@ int virgl_renderer_resource_attach_iov(int res_handle, struct iovec *iov, void virgl_renderer_resource_detach_iov(int res_handle, struct iovec **iov_p, int *num_iovs_p) { - return vrend_renderer_resource_detach_iov(res_handle, iov_p, num_iovs_p); + vrend_renderer_resource_detach_iov(res_handle, iov_p, num_iovs_p); } int virgl_renderer_create_fence(int client_fence_id, uint32_t ctx_id) @@ -243,14 +243,18 @@ static virgl_renderer_gl_context create_gl_context(int scanout_idx, struct virgl static void destroy_gl_context(virgl_renderer_gl_context ctx) { #ifdef HAVE_EPOXY_EGL_H - if (use_context == CONTEXT_EGL) - return virgl_egl_destroy_context(egl, ctx); + if (use_context == CONTEXT_EGL) { + virgl_egl_destroy_context(egl, ctx); + return; + } #endif #ifdef HAVE_EPOXY_GLX_H - if (use_context == CONTEXT_GLX) - return virgl_glx_destroy_context(glx_info, ctx); + if (use_context == CONTEXT_GLX) { + virgl_glx_destroy_context(glx_info, ctx); + return; + } #endif - return rcbs->destroy_gl_context(dev_cookie, ctx); + rcbs->destroy_gl_context(dev_cookie, ctx); } static int make_current(virgl_renderer_gl_context ctx)