mirror of
https://github.com/aap/librw.git
synced 2025-12-20 01:19:51 +00:00
Fix some warnings on gcc/clang
This commit is contained in:
@@ -278,7 +278,7 @@ struct RasterFormatInfo
|
||||
|
||||
// indexed directly by RW format
|
||||
static RasterFormatInfo formatInfoRW[16] = {
|
||||
{ 0, 0, 0},
|
||||
{ 0, 0, 0, 0},
|
||||
{ D3DFMT_A1R5G5B5, 16, 1, Raster::C1555 },
|
||||
{ D3DFMT_R5G6B5, 16, 0, Raster::C565 },
|
||||
{ D3DFMT_A4R4G4B4, 16, 1, Raster::C4444 },
|
||||
@@ -345,7 +345,7 @@ findFormatInfoD3D(uint32 d3dformat)
|
||||
{
|
||||
static RasterFormatInfo fake = { 0, 0, 0, 0 };
|
||||
int i;
|
||||
for(i = 0; i < nelem(formatInfoFull); i++)
|
||||
for(i = 0; i < (int)nelem(formatInfoFull); i++)
|
||||
if(formatInfoFull[i].d3dformat == d3dformat)
|
||||
return &formatInfoFull[i];
|
||||
return &fake;
|
||||
|
||||
@@ -532,7 +532,7 @@ struct RasterFormatInfo
|
||||
|
||||
// indexed directly by RW format
|
||||
static RasterFormatInfo formatInfoRW[16] = {
|
||||
{ 0, 0, 0},
|
||||
{ 0, 0, 0, 0},
|
||||
{ D3DFMT_A1R5G5B5, 16, 1, Raster::C1555 },
|
||||
{ D3DFMT_R5G6B5, 16, 0, Raster::C565 },
|
||||
{ D3DFMT_A4R4G4B4, 16, 1, Raster::C4444 },
|
||||
@@ -789,7 +789,7 @@ rasterToImage(Raster *raster)
|
||||
uint8 *pixels = raster->pixels;
|
||||
|
||||
// NB:
|
||||
assert(image->bpp == natras->bpp);
|
||||
assert(image->bpp == (int)natras->bpp);
|
||||
assert(image->stride == raster->stride);
|
||||
unswizzle(imgpixels, pixels, image->width, image->height, image->bpp);
|
||||
// Fix RGB order
|
||||
|
||||
Reference in New Issue
Block a user