[virglrenderer-devel] [PATCH 20/21] vtest_renderer.c: Fix warnings
Gert Wollny
gert.wollny at collabora.com
Fri Jun 1 08:48:07 UTC 2018
vtest_renderer.c: In function »vtest_write_fence«:
vtest_renderer.c:42:37: Warning: unused parameter »cookie« [-Wunused-
parameter]
static void vtest_write_fence(void *cookie, uint32_t fence_id_in)
^~~~~~
vtest_renderer.c: In function »vtest_create_renderer«:
vtest_renderer.c:136:13: Warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (ret != length) {
^~
vtest_renderer.c: In function »vtest_submit_cmd«:
vtest_renderer.c:243:13: Warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (ret != length_dw * 4) {
^~
vtest_renderer.c: In function »vtest_transfer_get«:
vtest_renderer.c:270:33: Warning: unused parameter »length_dw« [-
Wunused-parameter]
int vtest_transfer_get(uint32_t length_dw)
^~~~~~~~~
vtest_renderer.c: In function »vtest_transfer_put«:
vtest_renderer.c:309:33: Warning: unused parameter »length_dw« [-
Wunused-parameter]
int vtest_transfer_put(uint32_t length_dw)
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
vtest/vtest_renderer.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c
index 3b8fe1a..3dd1c73 100644
--- a/vtest/vtest_renderer.c
+++ b/vtest/vtest_renderer.c
@@ -34,6 +34,7 @@
#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;
@@ -41,6 +42,7 @@ static int fence_id = 1;
static int last_fence;
static void vtest_write_fence(void *cookie, uint32_t fence_id_in)
{
+ VREND_UNUSED(cookie);
last_fence = fence_id_in;
}
@@ -133,7 +135,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 +242,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;
}
@@ -269,6 +271,7 @@ int vtest_submit_cmd(uint32_t length_dw)
int vtest_transfer_get(uint32_t length_dw)
{
+ VREND_UNUSED(length_dw);
uint32_t thdr_buf[VCMD_TRANSFER_HDR_SIZE];
int ret;
int level;
@@ -308,6 +311,7 @@ int vtest_transfer_get(uint32_t length_dw)
int vtest_transfer_put(uint32_t length_dw)
{
+ VREND_UNUSED(length_dw);
uint32_t thdr_buf[VCMD_TRANSFER_HDR_SIZE];
int ret;
int level;
--
2.17.0
More information about the virglrenderer-devel
mailing list