From 9d437a26dd296d6cf7e4db4749a90cafe9787377 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 19 Jun 2012 21:19:17 +1000 Subject: TONY: Fix some compiler warnings in the newly added sound code --- engines/tony/sound.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp index 484b279cda..e4f46af146 100644 --- a/engines/tony/sound.cpp +++ b/engines/tony/sound.cpp @@ -266,7 +266,7 @@ uint32 CODECADPCMMONO::decompress(Common::SeekableReadStream *stream, void *buf, uint16 *lpBuf = (uint16 *)buf; byte *inp; int bufferstep; - int cache; + int cache = 0; int delta; int sign; int vpdiff; @@ -348,7 +348,7 @@ uint32 CODECADPCMSTEREO::decompress(Common::SeekableReadStream *stream, void *bu uint16 *lpBuf=(uint16 *)buf; byte *inp; int bufferstep; - int cache; + int cache = 0; int delta; int sign; int vpdiff; @@ -1015,7 +1015,7 @@ bool FPStream::unloadFile() { } void FPStream::prefetch() { - void *lpBuf; + void *lpBuf = NULL; if (!_bSoundSupported || !_bFileLoaded) return; @@ -1042,6 +1042,8 @@ void FPStream::prefetch() { _vm->GUIError("Cannot lock stream buffer!", "soundLoadStream()"); return; } +#else + error("lpBuf isn't set"); #endif // Uncompress the data from the stream directly into the locked buffer -- cgit v1.2.3