Purge on warnings under Linux.

This commit is contained in:
Robert Osfield
2002-04-16 14:09:46 +00:00
parent f8340f9ef5
commit 2b4008bbbc
20 changed files with 4500 additions and 1562 deletions

View File

@@ -114,7 +114,7 @@ class ReaderWriterPNG : public osgDB::ReaderWriter
png_read_image(png, row_p);
free(row_p);
int iBitCount;
int iBitCount=0;
if (trans == PNG_SOLID || trans == PNG_ALPHA || color == PNG_COLOR_TYPE_RGB_ALPHA || color == PNG_COLOR_TYPE_GRAY_ALPHA)
{
@@ -134,7 +134,9 @@ class ReaderWriterPNG : public osgDB::ReaderWriter
break;
default:
return ReadResult::FILE_NOT_HANDLED;
// error, will force return of ReadResult::FILE_NOT_HANDLED
// see below.
iBitCount = 0;
}
}
@@ -146,6 +148,9 @@ class ReaderWriterPNG : public osgDB::ReaderWriter
if (fp)
fclose(fp);
if (iBitCount==0)
return ReadResult::FILE_NOT_HANDLED;
osg::Image* pOsgImage = new osg::Image();
pOsgImage->setFileName(fileName.c_str());