[virglrenderer-devel] [PATCH 10/21] vrend_renderer.c: Fix warnings

Gert Wollny gert.wollny at collabora.com
Fri Jun 1 08:47:57 UTC 2018


vrend_renderer.c: In function »vrend_transfer_inline_write«:
vrend_renderer.c:5643:42: Warning: unused parameter »usage« [-Wunused-
parameter]
                                 unsigned usage)
                                          ^~~~~
vrend_renderer.c: In function »vrend_set_scissor_state«:
vrend_renderer.c:5699:18: Warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
    for (i = 0; i < num_scissor; i++) {
                  ^
vrend_renderer.c: In function »vrend_set_sample_mask«:
vrend_renderer.c:5755:50: Warning: unused parameter »ctx« [-Wunused-
parameter]
 void vrend_set_sample_mask(struct vrend_context *ctx, unsigned
sample_mask)
                                                  ^~~
vrend_renderer.c: In function »vrend_hw_emit_streamout_targets«:
vrend_renderer.c:5764:18: Warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
    for (i = 0; i < so_obj->num_targets; i++) {
                  ^
vrend_renderer.c:5760:67: Warning: unused parameter »ctx« [-Wunused-
parameter]
 static void vrend_hw_emit_streamout_targets(struct vrend_context *ctx,
struct vrend_streamout_object *so_obj)
                                                                   ^~~
vrend_renderer.c: In function »vrend_set_streamout_targets«:
vrend_renderer.c:5803:21: Warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
       for (i = 0; i < num_targets; i++) {
                     ^
vrend_renderer.c:5773:43: Warning: unused parameter »append_bitmask« [-
Wunused-parameter]
                                  uint32_t append_bitmask,
                                           ^~~~~~~~~~~~~~
vrend_renderer.c: In function »vrend_resource_buffer_copy«:
vrend_renderer.c:5824:62: Warning: unused parameter »ctx« [-Wunused-
parameter]
 static void vrend_resource_buffer_copy(struct vrend_context *ctx,

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

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 270f840..1eb1eba 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -5642,6 +5642,7 @@ int vrend_transfer_inline_write(struct vrend_context *ctx,
                                 struct vrend_transfer_info *info,
                                 unsigned usage)
 {
+   VREND_UNUSED(usage);
    struct vrend_resource *res;
 
    res = vrend_renderer_ctx_res_lookup(ctx, info->handle);
@@ -5688,7 +5689,7 @@ void vrend_set_scissor_state(struct vrend_context *ctx,
                              uint32_t num_scissor,
                              struct pipe_scissor_state *ss)
 {
-   int i, idx;
+   uint i, idx;
 
    if (start_slot > PIPE_MAX_VIEWPORTS ||
        num_scissor > (PIPE_MAX_VIEWPORTS - start_slot)) {
@@ -5754,12 +5755,14 @@ void vrend_set_clip_state(struct vrend_context *ctx, struct pipe_clip_state *ucp
 
 void vrend_set_sample_mask(struct vrend_context *ctx, unsigned sample_mask)
 {
+   VREND_UNUSED(ctx);
    glSampleMaski(0, sample_mask);
 }
 
 static void vrend_hw_emit_streamout_targets(struct vrend_context *ctx, struct vrend_streamout_object *so_obj)
 {
-   int i;
+   VREND_UNUSED(ctx);
+   uint i;
 
    for (i = 0; i < so_obj->num_targets; i++) {
       if (so_obj->so_targets[i]->buffer_offset || so_obj->so_targets[i]->buffer_size < so_obj->so_targets[i]->buffer->base.width0)
@@ -5774,8 +5777,9 @@ void vrend_set_streamout_targets(struct vrend_context *ctx,
                                  uint32_t num_targets,
                                  uint32_t *handles)
 {
+   VREND_UNUSED(append_bitmask);
    struct vrend_so_target *target;
-   int i;
+   uint i;
 
    if (num_targets) {
       bool found = false;
@@ -5827,6 +5831,7 @@ static void vrend_resource_buffer_copy(struct vrend_context *ctx,
                                        uint32_t dstx, uint32_t srcx,
                                        uint32_t width)
 {
+   VREND_UNUSED(ctx);
 
    glBindBuffer(GL_COPY_READ_BUFFER, src_res->id);
    glBindBuffer(GL_COPY_WRITE_BUFFER, dst_res->id);
-- 
2.17.0



More information about the virglrenderer-devel mailing list