Skip to content

Commit

Permalink
SCI: Fix Unused Variable Compiler Warning when SCI32 is not enabled.
Browse files Browse the repository at this point in the history
The bytesWritten variable is not used if SCI32 is not enabled. Fixed by
adding this and success flag to the debug console print.
  • Loading branch information
digitall committed Jan 10, 2017
1 parent df84aee commit 26452df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/sci/engine/kfile.cpp
Expand Up @@ -526,14 +526,15 @@ 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) {
bytesWritten = f->_out->write(buf, size);
success = !f->_out->err();
}

debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d (%d, %d)", handle, size, bytesWritten, success);

delete[] buf;

#ifdef ENABLE_SCI32
Expand Down

0 comments on commit 26452df

Please sign in to comment.