[virglrenderer-devel] [PATCH v2 20/21] vtest_renderer.c: Fix warnings
Gert Wollny
gert.wollny at collabora.com
Tue Jun 5 20:11:17 UTC 2018
vtest_renderer.c: In Funktion »vtest_write_fence«:
vtest_renderer.c:42:37: Warnung: unused parameter »cookie« [-Wunused-
parameter]
static void vtest_write_fence(void *cookie, uint32_t fence_id_in)
^~~~~~
vtest_renderer.c: In Funktion »vtest_create_renderer«:
vtest_renderer.c:136:13: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
if (ret != length) {
^~
vtest_renderer.c: In Funktion »vtest_submit_cmd«:
vtest_renderer.c:243:13: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
if (ret != length_dw * 4) {
^~
vtest_renderer.c: In Funktion »vtest_transfer_get«:
vtest_renderer.c:270:33: Warnung: unused parameter »length_dw« [-
Wunused-parameter]
int vtest_transfer_get(uint32_t length_dw)
^~~~~~~~~
vtest_renderer.c: In Funktion »vtest_transfer_put«:
vtest_renderer.c:309:33: Warnung: unused parameter »length_dw« [-
Wunused-parameter]
int vtest_transfer_put(uint32_t length_dw)
v2: Use mesa-style UNUSED for unused parameters
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
vtest/vtest_renderer.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c
index 3b8fe1a..d2ce989 100644
--- a/vtest/vtest_renderer.c
+++ b/vtest/vtest_renderer.c
@@ -34,12 +34,13 @@
#include "vtest.h"
#include "vtest_protocol.h"
#include "util.h"
+#include "util/u_debug.h"
static int ctx_id = 1;
static int fence_id = 1;
static int last_fence;
-static void vtest_write_fence(void *cookie, uint32_t fence_id_in)
+static void vtest_write_fence(UNUSED void *cookie, uint32_t fence_id_in)
{
last_fence = fence_id_in;
}
@@ -133,7 +134,7 @@ int vtest_create_renderer(int in_fd, int out_fd, uint32_t length)
return -1;
ret = vtest_block_read(renderer.in_fd, vtestname, length);
- if (ret != length) {
+ if (ret != (int)length) {
ret = -1;
goto end;
}
@@ -240,7 +241,7 @@ int vtest_submit_cmd(uint32_t length_dw)
return -1;
ret = vtest_block_read(renderer.in_fd, cbuf, length_dw * 4);
- if (ret != length_dw * 4) {
+ if (ret != (int)length_dw * 4) {
free(cbuf);
return -1;
}
@@ -267,7 +268,7 @@ int vtest_submit_cmd(uint32_t length_dw)
} while(0)
-int vtest_transfer_get(uint32_t length_dw)
+int vtest_transfer_get(UNUSED uint32_t length_dw)
{
uint32_t thdr_buf[VCMD_TRANSFER_HDR_SIZE];
int ret;
@@ -306,7 +307,7 @@ int vtest_transfer_get(uint32_t length_dw)
return ret < 0 ? ret : 0;
}
-int vtest_transfer_put(uint32_t length_dw)
+int vtest_transfer_put(UNUSED uint32_t length_dw)
{
uint32_t thdr_buf[VCMD_TRANSFER_HDR_SIZE];
int ret;
--
2.16.4
More information about the virglrenderer-devel
mailing list