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

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 22 03:37:15 PDT 2014


On 22/07/14 05:41, Chad Versace wrote:
> On 07/17/2014 11:45 AM, Emil Velikov wrote:
> 
>> 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_
> 
> On what system? Here is a copy-paste from /usr/include/GL/gl.h from Fedora's Mesa pacakge.
> 
> typedef int             GLint;          /* 4-byte signed */
> typedef unsigned int    GLuint;         /* 4-byte 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.
> 
> I'm not surprised if waffle uses GLint/GLuint inconsistently. It's difficult to keep
> them straight. Maybe we should replace all the GLint types with types from <stdint.h>?
> IIRC, Mesa has begun to do that in some source files.
> 
All the nitpicking was about waffle. Pardon if it was too much. Using stdint.h
types sounds sensible IMHO. Yet I thing that we may have to keep the GL types
for the function pointer declarations.

-Emil


More information about the waffle mailing list