Solve some warnings.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5429 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2017-04-17 13:44:07 +00:00
parent dbd17774d0
commit dee8ee63a7
4 changed files with 6 additions and 6 deletions

View File

@ -1940,7 +1940,6 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
bool parsePolygonOK = false; bool parsePolygonOK = false;
bool parseVcountOK = false; bool parseVcountOK = false;
u32 inputSemanticCount = 0; u32 inputSemanticCount = 0;
bool unresolvedInput=false;
u32 maxOffset = 0; u32 maxOffset = 0;
core::array<SColladaInput> localInputs; core::array<SColladaInput> localInputs;
@ -2095,7 +2094,6 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
os::Printer::log("COLLADA Warning, polygon input source not found", os::Printer::log("COLLADA Warning, polygon input source not found",
inp.Source.c_str(), ELL_DEBUG); inp.Source.c_str(), ELL_DEBUG);
inp.Semantic=ECIS_COUNT; // for unknown inp.Semantic=ECIS_COUNT; // for unknown
unresolvedInput=true;
} }
else else
{ {

View File

@ -732,7 +732,7 @@ IImage* CImageLoaderDDS::loadImage(io::IReadFile* file) const
#else #else
if (header.PixelFormat.Flags & DDPF_RGB) // Uncompressed formats if (header.PixelFormat.Flags & DDPF_RGB) // Uncompressed formats
{ {
u32 byteCount = header.PixelFormat.RGBBitCount / 8; // u32 byteCount = header.PixelFormat.RGBBitCount / 8;
if( header.Flags & DDSD_PITCH ) if( header.Flags & DDSD_PITCH )
dataSize = header.PitchOrLinearSize * header.Height * header.Depth * (header.PixelFormat.RGBBitCount / 8); dataSize = header.PitchOrLinearSize * header.Height * header.Depth * (header.PixelFormat.RGBBitCount / 8);

View File

@ -196,8 +196,6 @@ IImage* CImageLoaderWAL2::loadImage(irr::io::IReadFile* file) const
} }
u32 rawtexsize = header.width * header.height; u32 rawtexsize = header.width * header.height;
u8 *rawtex = new u8 [ rawtexsize ]; u8 *rawtex = new u8 [ rawtexsize ];
file->seek ( header.mipmap[0] ); file->seek ( header.mipmap[0] );
@ -213,6 +211,9 @@ IImage* CImageLoaderWAL2::loadImage(irr::io::IReadFile* file) const
case ECF_A8R8G8B8: case ECF_A8R8G8B8:
CColorConverter::convert8BitTo32Bit(rawtex, (u8*)image->getData(), header.width, header.height, (u8*) pal + 768, 0, false); CColorConverter::convert8BitTo32Bit(rawtex, (u8*)image->getData(), header.width, header.height, (u8*) pal + 768, 0, false);
break; break;
default:
// Assuming there are no other color formats (I found no information about this format)
break;
} }
delete [] rawtex; delete [] rawtex;

View File

@ -718,7 +718,8 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
File->read(pcData, decryptedSize); File->read(pcData, decryptedSize);
} }
bz_stream bz_ctx={0}; bz_stream bz_ctx;
memset(&bz_ctx, 0, sizeof(bz_ctx));
/* use BZIP2's default memory allocation /* use BZIP2's default memory allocation
bz_ctx->bzalloc = NULL; bz_ctx->bzalloc = NULL;
bz_ctx->bzfree = NULL; bz_ctx->bzfree = NULL;