Fix gcc warning pixbytes may be used uninitialized in this function

This commit is contained in:
Pan7 2017-02-24 22:07:29 +01:00
parent 3bc866b623
commit a6cf9ff3e4

View file

@ -161,6 +161,7 @@ void LoadBMP( char *filename, bitmap_t *bit ){
{
Error( "Only 8BPP and 24BPP supported" );
//Error("BPP %d not supported.", info.biBitCount);
return;
}
// if this is an eight bit image load palette
@ -268,6 +269,7 @@ void WriteBMP( char *filename, bitmap_t *bit ){
{
Error( "Only 8BPP and 24BPP supported" );
//Error("BPP %d not supported.", bit->bpp);
return;
}
@ -346,6 +348,7 @@ void NewBMP( int width, int height, int bpp, bitmap_t *bit ){
else
{
Error( "NewBMP: 8 or 24 bit only." );
return;
}
bit->bpp = bpp;