From f434be0d5a2065354823505431fa71dc72f1584f Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 7 Aug 2018 15:43:45 +0200 Subject: [PATCH] shader: Fix warnings: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vrend_shader.c:4400: Warning: Comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ctx->cfg->max_draw_buffers; i++) { ^ vrend_shader.c:4728:28: Warning: Unused variable »i« [-Wunused-variable] int start, count, i; Reviewed-by: Erik Faye-Lund Signed-off-by: Gert Wollny Signed-off-by: Jakob Bornecrantz --- src/vrend_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index da63073..cbecc84 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -4397,7 +4397,7 @@ static char *emit_ios(struct dump_ctx *ctx, char *glsl_hdr) } if (ctx->write_all_cbufs) { - for (i = 0; i < ctx->cfg->max_draw_buffers; i++) { + for (i = 0; i < (uint32_t)ctx->cfg->max_draw_buffers; i++) { if (ctx->cfg->use_gles) snprintf(buf, 255, "layout (location=%d) out vec4 fsout_c%d;\n", i, i); else @@ -4725,7 +4725,7 @@ static char *emit_ios(struct dump_ctx *ctx, char *glsl_hdr) if (ctx->info.indirect_files & (1 << TGSI_FILE_BUFFER)) { uint32_t mask = ctx->ssbo_used_mask; while (mask) { - int start, count, i; + int start, count; u_bit_scan_consecutive_range(&mask, &start, &count); const char *atomic = (ctx->ssbo_atomic_mask & (1 << start)) ? "atomic" : ""; snprintf(buf, 255, "layout (binding = %d, std430) buffer %sssbo%d { uint %sssbocontents%d[]; } %sssboarr%s[%d];\n", start, sname, start, sname, start, sname, atomic, count);