mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 15:31:59 +00:00
GRAPHICS: Fix code analysis warnings
See bug report #3087917 svn-id: r53493
This commit is contained in:
parent
81de95671c
commit
ccb3506719
@ -2301,12 +2301,15 @@ byte *VMDDecoder::deDPCM(const byte *data, uint32 &size, int32 init[2]) {
|
||||
uint32 outSize = size + channels;
|
||||
|
||||
int16 *out = (int16 *)malloc(outSize * 2);
|
||||
byte *sound = (byte *) out;
|
||||
byte *sound = (byte *)out;
|
||||
|
||||
if (!out)
|
||||
return 0;
|
||||
|
||||
int channel = 0;
|
||||
|
||||
for (int i = 0; i < channels; i++) {
|
||||
*out++ = TO_BE_16(init[channel]);
|
||||
*out++ = TO_BE_16(init[channel]);
|
||||
|
||||
channel = (channel + 1) % channels;
|
||||
}
|
||||
@ -2464,6 +2467,7 @@ Common::MemoryReadStream *VMDDecoder::getEmbeddedFile(const Common::String &file
|
||||
free(data);
|
||||
warning("VMDDecoder::getEmbeddedFile(): Couldn't read %d bytes (file \"%s\")",
|
||||
file->realSize, fileName.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Common::MemoryReadStream *stream =
|
||||
|
Loading…
x
Reference in New Issue
Block a user