[AD] warnings when using VC 7 (.net)

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


When I compile allegro apps with VC.NET, I get a list of warnings... It
compiles and runs fine though.

After the warnings, I have listed two of the different chunks of code that
the IDE jumped to when I double clicked the warning line.

I assume its casting issues, but it looked like the warnings were there even
with explicit casting...  I'm using just the standard out-of-the-box
settings, so maybe its on my end - but I thought someone here may wanna know
... if they didn't already. ;)

--
Matthew Leverton  - matthew@xxxxxxxxxx
http://www.allegro.cc


c:\Program Files\Microsoft Visual Studio
.NET\Vc7\include\allegro\internal\alconfig.h(282) : 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(294) : 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(251) : 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(265) : 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(276) : 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(290) : 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(301) : 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(315) : 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(351) : 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(365) : warning C4312: 'type cast' :
conversion from 'unsigned long' to 'unsigned long *' of greater size

---

AL_INLINE(void, bmp_write24, (unsigned long addr, int c),
{
unsigned char *p = (unsigned char *)addr;
p[0] = c & 0xFF;
p[1] = (c>>8) & 0xFF;
p[2] = (c>>16) & 0xFF;
})

---

AL_INLINE(void, _putpixel, (BITMAP *bmp, int x, int y, int color),
{
unsigned long addr;
bmp_select(bmp);
addr = bmp_write_line(bmp, y);
bmp_write8(addr+x, color);
bmp_unwrite_line(bmp);
})



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