SDL_bmp.c: remove unused variable warnings
parent
e5580e18ba
commit
1b5e3c19a2
|
@ -192,23 +192,23 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
|
||||||
|
|
||||||
/* The Win32 BMP file header (14 bytes) */
|
/* The Win32 BMP file header (14 bytes) */
|
||||||
char magic[2];
|
char magic[2];
|
||||||
Uint32 bfSize;
|
/* Uint32 bfSize; */
|
||||||
Uint16 bfReserved1;
|
/* Uint16 bfReserved1; */
|
||||||
Uint16 bfReserved2;
|
/* Uint16 bfReserved2; */
|
||||||
Uint32 bfOffBits;
|
Uint32 bfOffBits;
|
||||||
|
|
||||||
/* The Win32 BITMAPINFOHEADER struct (40 bytes) */
|
/* The Win32 BITMAPINFOHEADER struct (40 bytes) */
|
||||||
Uint32 biSize;
|
Uint32 biSize;
|
||||||
Sint32 biWidth = 0;
|
Sint32 biWidth = 0;
|
||||||
Sint32 biHeight = 0;
|
Sint32 biHeight = 0;
|
||||||
Uint16 biPlanes;
|
/* Uint16 biPlanes; */
|
||||||
Uint16 biBitCount = 0;
|
Uint16 biBitCount = 0;
|
||||||
Uint32 biCompression = 0;
|
Uint32 biCompression = 0;
|
||||||
Uint32 biSizeImage;
|
/* Uint32 biSizeImage; */
|
||||||
Sint32 biXPelsPerMeter;
|
/* Sint32 biXPelsPerMeter; */
|
||||||
Sint32 biYPelsPerMeter;
|
/* Sint32 biYPelsPerMeter; */
|
||||||
Uint32 biClrUsed = 0;
|
Uint32 biClrUsed = 0;
|
||||||
Uint32 biClrImportant;
|
/* Uint32 biClrImportant; */
|
||||||
|
|
||||||
/* Make sure we are passed a valid data source */
|
/* Make sure we are passed a valid data source */
|
||||||
surface = NULL;
|
surface = NULL;
|
||||||
|
@ -231,9 +231,9 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
|
||||||
was_error = SDL_TRUE;
|
was_error = SDL_TRUE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
bfSize = SDL_ReadLE32(src);
|
/* bfSize = */ SDL_ReadLE32(src);
|
||||||
bfReserved1 = SDL_ReadLE16(src);
|
/* bfReserved1 = */ SDL_ReadLE16(src);
|
||||||
bfReserved2 = SDL_ReadLE16(src);
|
/* bfReserved2 = */ SDL_ReadLE16(src);
|
||||||
bfOffBits = SDL_ReadLE32(src);
|
bfOffBits = SDL_ReadLE32(src);
|
||||||
|
|
||||||
/* Read the Win32 BITMAPINFOHEADER */
|
/* Read the Win32 BITMAPINFOHEADER */
|
||||||
|
@ -241,26 +241,26 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
|
||||||
if (biSize == 12) { /* really old BITMAPCOREHEADER */
|
if (biSize == 12) { /* really old BITMAPCOREHEADER */
|
||||||
biWidth = (Uint32) SDL_ReadLE16(src);
|
biWidth = (Uint32) SDL_ReadLE16(src);
|
||||||
biHeight = (Uint32) SDL_ReadLE16(src);
|
biHeight = (Uint32) SDL_ReadLE16(src);
|
||||||
biPlanes = SDL_ReadLE16(src);
|
/* biPlanes = */ SDL_ReadLE16(src);
|
||||||
biBitCount = SDL_ReadLE16(src);
|
biBitCount = SDL_ReadLE16(src);
|
||||||
biCompression = BI_RGB;
|
biCompression = BI_RGB;
|
||||||
biSizeImage = 0;
|
/* biSizeImage = 0; */
|
||||||
biXPelsPerMeter = 0;
|
/* biXPelsPerMeter = 0; */
|
||||||
biYPelsPerMeter = 0;
|
/* biYPelsPerMeter = 0; */
|
||||||
biClrUsed = 0;
|
biClrUsed = 0;
|
||||||
biClrImportant = 0;
|
/* biClrImportant = 0; */
|
||||||
} else if (biSize >= 40) { /* some version of BITMAPINFOHEADER */
|
} else if (biSize >= 40) { /* some version of BITMAPINFOHEADER */
|
||||||
Uint32 headerSize;
|
Uint32 headerSize;
|
||||||
biWidth = SDL_ReadLE32(src);
|
biWidth = SDL_ReadLE32(src);
|
||||||
biHeight = SDL_ReadLE32(src);
|
biHeight = SDL_ReadLE32(src);
|
||||||
biPlanes = SDL_ReadLE16(src);
|
/* biPlanes = */ SDL_ReadLE16(src);
|
||||||
biBitCount = SDL_ReadLE16(src);
|
biBitCount = SDL_ReadLE16(src);
|
||||||
biCompression = SDL_ReadLE32(src);
|
biCompression = SDL_ReadLE32(src);
|
||||||
biSizeImage = SDL_ReadLE32(src);
|
/* biSizeImage = */ SDL_ReadLE32(src);
|
||||||
biXPelsPerMeter = SDL_ReadLE32(src);
|
/* biXPelsPerMeter = */ SDL_ReadLE32(src);
|
||||||
biYPelsPerMeter = SDL_ReadLE32(src);
|
/* biYPelsPerMeter = */ SDL_ReadLE32(src);
|
||||||
biClrUsed = SDL_ReadLE32(src);
|
biClrUsed = SDL_ReadLE32(src);
|
||||||
biClrImportant = SDL_ReadLE32(src);
|
/* biClrImportant = */ SDL_ReadLE32(src);
|
||||||
|
|
||||||
/* 64 == BITMAPCOREHEADER2, an incompatible OS/2 2.x extension. Skip this stuff for now. */
|
/* 64 == BITMAPCOREHEADER2, an incompatible OS/2 2.x extension. Skip this stuff for now. */
|
||||||
if (biSize != 64) {
|
if (biSize != 64) {
|
||||||
|
|
Loading…
Reference in New Issue