[AD] alconfig.h errors

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I've reported this several times, but as I recently upgraded from 4.1.5 to 
4.1.9 I was hoping it had been fixed but it had not.  alconfig compiles 
with warnings, because it assumes that the size of a long is equal to the 
size of an unsigned char*.

c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\internal\alconfig.h(286) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned char *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\internal\alconfig.h(298) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned char *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\inline\draw.inl(250) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned char *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\inline\draw.inl(264) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned char *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\inline\draw.inl(275) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned short *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\inline\draw.inl(289) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned short *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\inline\draw.inl(300) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned short *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\inline\draw.inl(314) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned short *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\inline\draw.inl(350) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned long *' of greater size
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\allegro\inline\draw.inl(364) : warning C4312: 'type cast' : conversion from 'unsigned long' to 'unsigned long *' of greater size

I am using MSVC.NET 2002, I don't have MSVC 2003, but I figure the same 
results would occur.  I do the following in my programs to prevent this 
from happening every time I include allegro.h:

#pragma warning( push )
#pragma warning( disable : 4312 )
#include <allegro.h>
#pragma warning( pop )

I suppose this would not be an easy fix since it seems to be a way that 
Allegro was designed.  I couldn't fix the warnings without changing the 
Allegro interface, so there may not be an easy way.

Just figure I'd bring it up again.

Gillius





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/