[waffle] [PATCH 09/33] wflinfo: silence signed/unsigned comparison warning

Chad Versace chad.versace at linux.intel.com
Wed Jul 16 21:03:09 PDT 2014


On 07/07/2014 10:28 AM, Emil Velikov wrote:
> The variable i is used as and compared vs unsigned int.
> Change it's type so silcence the compiler warning.
> 
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  src/utils/wflinfo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
> index 3508cc6..58028f9 100644
> --- a/src/utils/wflinfo.c
> +++ b/src/utils/wflinfo.c
> @@ -778,7 +778,7 @@ gl_has_extension_GetStringi(const char *name)
>          error_printf("Wflinfo", "glGetIntegerv(GL_NUM_EXTENSIONS) failed");
>      }
>  
> -    for (int i = 0; i < num_exts; i++) {
> +	for (uint32_t i = 0; i < num_exts; i++) {
>          const uint8_t *ext = glGetStringi(GL_EXTENSIONS, i);
>          if (!ext || glGetError()) {
>              error_printf("Wflinfo", "glGetStringi(GL_EXTENSIONS) failed");
> 

This patch is correct as-is, and is
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

The patch in your for-upstream-3.1 branch (commit
010aeff75cd1129ade5a55264efa396d4e7e9f73) is incorrect, though. If you
run `sed s/GLint/GLuint/g' on commit
010aeff75cd1129ade5a55264efa396d4e7e9f73 (on the commit message too),
then the patch becomes correct. If do the sed, then that patch also has
my r-b.


More information about the waffle mailing list