mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 09:49:14 +00:00
LASTEXPRESS: Fix analysis warnings
This commit is contained in:
parent
4b05031042
commit
cd5e750a7f
@ -107,6 +107,7 @@ byte *Background::decodeComponent(Common::SeekableReadStream *in, uint32 inSize,
|
||||
return NULL;
|
||||
|
||||
// Initialize the decoding
|
||||
memset(out, 0, outSize * sizeof(byte));
|
||||
uint32 inPos = 0;
|
||||
uint32 outPos = 0;
|
||||
|
||||
|
@ -139,6 +139,9 @@ void Debugger::copyCommand(int argc, const char **argv) {
|
||||
|
||||
for (int i = 0; i < _numParams; i++) {
|
||||
_commandParams[i] = (char *)malloc(strlen(argv[i]) + 1);
|
||||
if (_commandParams[i] == NULL)
|
||||
error("[Debugger::copyCommand] Cannot allocate memory for command parameters");
|
||||
|
||||
memset(_commandParams[i], 0, strlen(argv[i]) + 1);
|
||||
strcpy(_commandParams[i], argv[i]);
|
||||
}
|
||||
|
@ -67,6 +67,8 @@ void SoundQueue::handleTimer() {
|
||||
|
||||
for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
|
||||
SoundEntry *entry = (*i);
|
||||
if (entry == NULL)
|
||||
error("[SoundQueue::handleTimer] Invalid entry found in sound queue");
|
||||
|
||||
// When the entry has stopped playing, we remove his buffer
|
||||
if (entry->isFinished()) {
|
||||
@ -123,6 +125,8 @@ void SoundQueue::updateQueue() {
|
||||
|
||||
for (Common::List<SoundEntry *>::iterator it = _soundList.begin(); it != _soundList.end(); ++it) {
|
||||
SoundEntry *entry = *it;
|
||||
if (entry == NULL)
|
||||
error("[SoundQueue::updateQueue] Invalid entry found in sound queue");
|
||||
|
||||
// Original removes the entry data from the cache and sets the archive as not loaded
|
||||
// and if the sound data buffer is not full, loads a new entry to be played based on
|
||||
@ -179,6 +183,8 @@ void SoundQueue::clearQueue() {
|
||||
|
||||
for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
|
||||
SoundEntry *entry = (*i);
|
||||
if (entry == NULL)
|
||||
error("[SoundQueue::clearQueue] Invalid entry found in sound queue");
|
||||
|
||||
// Delete entry
|
||||
entry->close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user