On 17/07/14 05:03, Chad Versace wrote:
> 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.veli...@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.vers...@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.
> 
I'll just use the original (above) patch, otherwise things are a bit too
hairy. Continue reading if interested in my nitpicking:

* GLuint is not defined (typedeffed)
* The GLint is typedeffed as _unsigned_
* Parts of wflinfo use "unsigned" GLint where they should use signed one, and
"unsigned" GLint where GLuint is required.
* gl_basic is in a similar state, and perhaps others.

Cheers,
Emil
_______________________________________________
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to