Re: [warzone2100-dev] [Warzone2100-commits] SF.net SVN: warzone2100:[8584] trunk/lib/ivis_common/tex.h
On Mon, Nov 30, 2009 at 01:42:44AM +, zare...@users.sourceforge.net wrote: Revision: 8584 http://warzone2100.svn.sourceforge.net/warzone2100/?rev=8584view=rev Author: zarelsl Date: 2009-11-30 01:42:38 + (Mon, 30 Nov 2009) Log Message: --- Fix a bug where a long was dereferenced from an int pointer. Modified Paths: -- trunk/lib/ivis_common/tex.h I'm curious what bug this was meant to fix. The changeset diff looks like this: --- lib/ivis_common/tex.h (revision 8583) +++ lib/ivis_common/tex.h (revision 8584) @@ -37,7 +37,7 @@ typedef struct { char name[iV_TEXNAME_MAX]; - unsigned int id; + unsigned long id; } iTexPage; I suspect that id member should be a GLuint. It seems to be used that way in the code and this would get around all those problems Zarel had trying to coerce some platform specific type into a GLuint. If not, we probably have some deep issues here with word size since that unsigned long is going to be 64 bits on some platforms and 32 bits on others. -- Stephen Swaney sswa...@centurytel.net ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [warzone2100-dev] [Warzone2100-commits] SF.net SVN: warzone2100:[8584] trunk/lib/ivis_common/tex.h
On Fri, Dec 4, 2009 at 6:05 PM, Stephen Swaney sswa...@centurytel.net wrote: I'm curious what bug this was meant to fix. The changeset diff looks like this: --- lib/ivis_common/tex.h (revision 8583) +++ lib/ivis_common/tex.h (revision 8584) @@ -37,7 +37,7 @@ typedef struct { char name[iV_TEXNAME_MAX]; - unsigned int id; + unsigned long id; } iTexPage; I suspect that id member should be a GLuint. It seems to be used that way in the code and this would get around all those problems Zarel had trying to coerce some platform specific type into a GLuint. If not, we probably have some deep issues here with word size since that unsigned long is going to be 64 bits on some platforms and 32 bits on others. Basically, it's supposed to be GLuint id - using unsigned int generates an Xcode compile warning, since GLuint is defined as an unsigned long in Mac OS X. But for some reason, actually using GLuint results in weird compile errors (even when I include the relevant headers). I noticed that the warnings disappeared when I changed the int to long, and another dev (I think it may have been cybersphinx?) said something like if it gets rid of the warning, commit it, and you know the rest of the story. -Zarel ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [warzone2100-dev] [Warzone2100-commits] SF.net SVN: warzone2100:[8584] trunk/lib/ivis_common/tex.h
On 12/4/09, Zarel zarel...@xx.com wrote: On Fri, Dec 4, 2009 at 6:05 PM, Stephen Swaney sswaxx...@.net wrote: I'm curious what bug this was meant to fix. The changeset diff looks like this: --- lib/ivis_common/tex.h (revision 8583) +++ lib/ivis_common/tex.h (revision 8584) @@ -37,7 +37,7 @@ typedef struct { char name[iV_TEXNAME_MAX]; - unsigned int id; + unsigned long id; } iTexPage; I suspect that id member should be a GLuint. It seems to be used that way in the code and this would get around all those problems Zarel had trying to coerce some platform specific type into a GLuint. If not, we probably have some deep issues here with word size since that unsigned long is going to be 64 bits on some platforms and 32 bits on others. Basically, it's supposed to be GLuint id - using unsigned int generates an Xcode compile warning, since GLuint is defined as an unsigned long in Mac OS X. But for some reason, actually using GLuint results in weird compile errors (even when I include the relevant headers). I noticed that the warnings disappeared when I changed the int to long, and another dev (I think it may have been cybersphinx?) said something like if it gets rid of the warning, commit it, and you know the rest of the story. O_o ... so why not change it to what it should be? GLuint? ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [warzone2100-dev] [Warzone2100-commits] SF.net SVN: warzone2100:[8584] trunk/lib/ivis_common/tex.h
On Fri, Dec 04, 2009 at 07:05:54PM -0500, Steve wrote: I suspect that id member should be a GLuint. It seems to be used that way in the code and this would get around all those problems Zarel had trying to coerce some platform specific type into a GLuint. A patch. http://developer.wz2100.net/ticket/1148 -- Stephen Swaney sswa...@centurytel.net ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev