Re: [Mesa-dev] [PATCH] mesa: silence some compilation warnings.

2011-05-12 Thread zhigang gong
Thanks for your suggestion. Jose already revised my patch to use uintptr_t instead of long. On Fri, May 13, 2011 at 1:48 AM, Ian Romanick wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 05/12/2011 01:49 AM, zhigang gong wrote: >> glu.h: typedef void (GLAPIENTRYP _GLUfuncptr)(); ca

Re: [Mesa-dev] [PATCH] mesa: silence some compilation warnings.

2011-05-12 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/12/2011 01:49 AM, zhigang gong wrote: > glu.h: typedef void (GLAPIENTRYP _GLUfuncptr)(); causes the following >warning: function declaration isn't a prototype. > egl: When convert a (void *) to a int type, it's better to >conver

Re: [Mesa-dev] [PATCH] mesa: silence some compilation warnings.

2011-05-12 Thread Jose Fonseca
I agree with Patrick concerning the int casts. Zhigang, I've commited your changes have tweaking the int casts. Plus a few other warning fixes. I did only a test compile here, so let me know if I broke anything. Jose - Original Message - > I would be wary of assuming you can typec

Re: [Mesa-dev] [PATCH] mesa: silence some compilation warnings.

2011-05-12 Thread Patrick Baggett
I would be wary of assuming you can typecast long -> pointer, or pointer -> long. On 64-bit Windows, sizeof(int) == sizeof(long) == 4 but sizeof(void*) == 8. On 64-bit Linux (gcc), sizeof(int) == 4, sizeof(long) == sizeof(void*) == 8. It would be better to use with uintptr_t -- it was designed to

[Mesa-dev] [PATCH] mesa: silence some compilation warnings.

2011-05-12 Thread zhigang gong
glu.h: typedef void (GLAPIENTRYP _GLUfuncptr)(); causes the following warning: function declaration isn't a prototype. egl: When convert a (void *) to a int type, it's better to convert to long firstly, otherwise in 64 bit envirnonment, it causes compilation warning. --- inc