[virglrenderer-devel] [PATCH v2 09/15] gallium/aux/tgsi_scan.c: Fix -Wsign-compare warning
Gert Wollny
gert.wollny at collabora.com
Tue Jun 5 20:19:57 UTC 2018
tgsi/tgsi_scan.c:37:0:
tgsi/tgsi_scan.c: In function 'tgsi_scan_shader':
tgsi/tgsi_scan.c:212:46: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
assert(src->Register.Index < Elements(info-
>is_msaa_sampler));
^
/util/u_debug.h:183:30: note: in definition of macro 'debug_assert'
#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr,
__FILE__, __LINE__, __FUNCTION__))
^~~~
auxiliary/tgsi/tgsi_scan.c:212:19: note: in expansion of macro 'assert'
assert(src->Register.Index < Elements(info-
>is_msaa_sampler));
^~~~~~
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/gallium/auxiliary/tgsi/tgsi_scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 40f3db8..43c74b4 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -209,7 +209,7 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
/* MSAA samplers */
if (src->Register.File == TGSI_FILE_SAMPLER) {
assert(fullinst->Instruction.Texture);
- assert(src->Register.Index < Elements(info->is_msaa_sampler));
+ assert(src->Register.Index < (int)Elements(info->is_msaa_sampler));
if (fullinst->Instruction.Texture &&
(fullinst->Texture.Texture == TGSI_TEXTURE_2D_MSAA ||
--
2.16.4
More information about the virglrenderer-devel
mailing list