[virglrenderer-devel] [PATCH v2 17/21] testvirgl.c: Fix warnings

Gert Wollny gert.wollny at collabora.com
Tue Jun 5 20:11:14 UTC 2018


testvirgl.c: In function »testvirgl_write_fence«:
testvirgl.c:98:41: warning: unused parameter »cookie« [-Wunused-
parameter]
 static void testvirgl_write_fence(void *cookie, uint32_t fence)
                                         ^~~~~~
testvirgl.c: In function »get_caps«:
testvirgl.c:272:33: warning: Variable »glsl_level« not used 
[-Wunused-variable]
     uint32_t max_ver, max_size, glsl_level;

v2: use mesa style UNUSED annotation for unused parameters

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
 tests/testvirgl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/testvirgl.c b/tests/testvirgl.c
index f4ae92d..aea386a 100644
--- a/tests/testvirgl.c
+++ b/tests/testvirgl.c
@@ -95,9 +95,9 @@ static struct myinfo_struct mystruct;
 static struct virgl_renderer_callbacks test_cbs;
 
 static uint32_t testvirgl_last_fence;
-static void testvirgl_write_fence(void *cookie, uint32_t fence)
+static void testvirgl_write_fence(UNUSED void *cookie, uint32_t fence)
 {
-    testvirgl_last_fence = fence;
+   testvirgl_last_fence = fence;
 }
 
 uint32_t testvirgl_get_last_fence(void)
@@ -269,7 +269,7 @@ int testvirgl_create_backed_simple_buffer(struct virgl_resource *res,
 
 static void *get_caps(void)
 {
-    uint32_t max_ver, max_size, glsl_level;
+    uint32_t max_ver, max_size;
     void *caps;
 
     virgl_renderer_get_cap_set(1, &max_ver, &max_size);
-- 
2.16.4



More information about the virglrenderer-devel mailing list