[Scummvm-git-logs] scummvm master -> 26452df85566fe1ffc8555003fdfdd6456b59a7e

digitall dgturner at iee.org
Tue Jan 10 07:08:52 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
26452df855 SCI: Fix Unused Variable Compiler Warning when SCI32 is not enabled.


Commit: 26452df85566fe1ffc8555003fdfdd6456b59a7e
    https://github.com/scummvm/scummvm/commit/26452df85566fe1ffc8555003fdfdd6456b59a7e
Author: D G Turner (digitall at scummvm.org)
Date: 2017-01-10T06:14:03Z

Commit Message:
SCI: Fix Unused Variable Compiler Warning when SCI32 is not enabled.

The bytesWritten variable is not used if SCI32 is not enabled. Fixed by
adding this and success flag to the debug console print.

Changed paths:
    engines/sci/engine/kfile.cpp


diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 796eb08..9d74ed1 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -526,7 +526,6 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) {
 	uint bytesWritten = 0;
 	bool success = false;
 	s->_segMan->memcpy((byte *)buf, argv[1], size);
-	debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size);
 
 	FileHandle *f = getFileFromHandle(s, handle);
 	if (f) {
@@ -534,6 +533,8 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) {
 		success = !f->_out->err();
 	}
 
+	debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d (%d, %d)", handle, size, bytesWritten, success);
+
 	delete[] buf;
 
 #ifdef ENABLE_SCI32





More information about the Scummvm-git-logs mailing list