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

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


vrend_renderer.c: In Funktion »vrend_destroy_shader_selector«:
vrend_renderer.c:627:21: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
       for (i = 0; i < sel->sinfo.so_info.num_outputs; i++)
                     ^
vrend_renderer.c: In Funktion »dump_stream_out«:
vrend_renderer.c:776:18: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
    for (i = 0; i < so->num_outputs; i++) {
                  ^
vrend_renderer.c: In Funktion »set_stream_out_varyings«:
vrend_renderer.c:828:18: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
    for (i = 0; i < so->num_outputs; i++) {
                  ^
vrend_renderer.c: In Funktion »vrend_destroy_streamout_object«:
vrend_renderer.c:1130:18: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
    for (i = 0; i < obj->num_targets; i++)
                  ^
vrend_renderer.c: In Funktion »vrend_destroy_so_target_object«:
vrend_renderer.c:1200:21: Warnung: Vergleich zwischen
vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-
compare]
       for (i = 0; i < obj->num_targets; i++) {

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

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 53df8a4..338fb90 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -617,7 +617,7 @@ static void vrend_shader_destroy(struct vrend_shader *shader)
 static void vrend_destroy_shader_selector(struct vrend_shader_selector *sel)
 {
    struct vrend_shader *p = sel->current, *c;
-   int i;
+   unsigned i;
    while (p) {
       c = p->next_variant;
       vrend_shader_destroy(p);
@@ -764,7 +764,7 @@ static void vrend_stencil_test_enable(struct vrend_context *ctx, bool stencil_te
 
 static void dump_stream_out(struct pipe_stream_output_info *so)
 {
-   int i;
+   unsigned i;
    if (!so)
       return;
    printf("streamout: %d\n", so->num_outputs);
@@ -813,7 +813,8 @@ static void set_stream_out_varyings(int prog_id, struct vrend_shader_info *sinfo
 {
    struct pipe_stream_output_info *so = &sinfo->so_info;
    char *varyings[PIPE_MAX_SHADER_OUTPUTS*2];
-   int i, j;
+   unsigned i;
+   int j;
    int n_outputs = 0;
    int last_buffer = 0;
    char *start_skip;
@@ -1125,7 +1126,7 @@ static void vrend_free_programs(struct vrend_sub_context *sub)
 
 static void vrend_destroy_streamout_object(struct vrend_streamout_object *obj)
 {
-   int i;
+   unsigned i;
    list_del(&obj->head);
    for (i = 0; i < obj->num_targets; i++)
       vrend_so_target_reference(&obj->so_targets[i], NULL);
@@ -1193,7 +1194,7 @@ static void vrend_destroy_so_target_object(void *obj_ptr)
    struct vrend_sub_context *sub_ctx = target->sub_ctx;
    struct vrend_streamout_object *obj, *tmp;
    bool found;
-   int i;
+   unsigned i;
 
    LIST_FOR_EACH_ENTRY_SAFE(obj, tmp, &sub_ctx->streamout_list, head) {
       found = false;
-- 
2.16.4



More information about the virglrenderer-devel mailing list