[Scummvm-cvs-logs] scummvm master -> d8045c67273faedd806c0e0f11801df2bb9ce4c6

salty-horse ori at avtalion.name
Thu Jan 7 13:56:37 CET 2016


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:
d8045c6727 JANITORIAL: Fix clang printf warnings


Commit: d8045c67273faedd806c0e0f11801df2bb9ce4c6
    https://github.com/scummvm/scummvm/commit/d8045c67273faedd806c0e0f11801df2bb9ce4c6
Author: Ori Avtalion (ori at avtalion.name)
Date: 2016-01-07T14:55:32+02:00

Commit Message:
JANITORIAL: Fix clang printf warnings

Changed paths:
    audio/midiparser_smf.cpp
    engines/cine/various.cpp
    engines/scumm/insane/insane.cpp
    engines/scumm/resource.cpp
    engines/scumm/smush/imuse_channel.cpp
    engines/sword2/interpreter.cpp
    engines/sword2/memory.cpp
    engines/tinsel/anim.cpp



diff --git a/audio/midiparser_smf.cpp b/audio/midiparser_smf.cpp
index a614e5b..d1d86b9 100644
--- a/audio/midiparser_smf.cpp
+++ b/audio/midiparser_smf.cpp
@@ -204,7 +204,7 @@ bool MidiParser_SMF::loadMusic(byte *data, uint32 size) {
 	int tracksRead = 0;
 	while (tracksRead < _numTracks) {
 		if (memcmp(pos, "MTrk", 4) && !isGMF) {
-			warning("Position: %p ('%c')", pos, *pos);
+			warning("Position: %p ('%c')", (void *)pos, *pos);
 			warning("Hit invalid block '%c%c%c%c' while scanning for track locations", pos[0], pos[1], pos[2], pos[3]);
 			return false;
 		}
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index cd877a3..74dee1f 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -1492,7 +1492,7 @@ uint16 addAni(uint16 param1, uint16 objIdx, const int8 *ptr, SeqListElement &ele
 	int16 di;
 
 	debug(5, "addAni: param1 = %d, objIdx = %d, ptr = %p, element.var8 = %d, element.var14 = %d param3 = %d",
-	      param1, objIdx, ptr, element.var8, element.var14, param3);
+	      param1, objIdx, (const void *)ptr, element.var8, element.var14, param3);
 
 	// In the original an error string is set and 0 is returned if the following doesn't hold
 	assert(ptr);
diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp
index b3e9a0e..f0bbab5 100644
--- a/engines/scumm/insane/insane.cpp
+++ b/engines/scumm/insane/insane.cpp
@@ -1406,7 +1406,7 @@ int32 Insane::smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32
 	int32 offset;
 
 	debugC(DEBUG_INSANE, "smush_setupSanWithFlu(%s, %d, %d, %d, %d, %p, %d)", filename, setupsan2,
-		  step1, step2, setupsan1, fluPtr, numFrames);
+		  step1, step2, setupsan1, (void *)fluPtr, numFrames);
 
 	_smush_setupsan1 = setupsan1;
 
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index d4e4f43..5456ae4 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -748,7 +748,7 @@ byte *ScummEngine::getResourceAddress(ResType type, ResId idx) {
 
 	_res->setResourceCounter(type, idx, 1);
 
-	debugC(DEBUG_RESOURCE, "getResourceAddress(%s,%d) == %p", nameOfResType(type), idx, ptr);
+	debugC(DEBUG_RESOURCE, "getResourceAddress(%s,%d) == %p", nameOfResType(type), idx, (void *)ptr);
 	return ptr;
 }
 
diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp
index 461aff9..24cb03f 100644
--- a/engines/scumm/smush/imuse_channel.cpp
+++ b/engines/scumm/smush/imuse_channel.cpp
@@ -156,7 +156,7 @@ void ImuseChannel::decode() {
 			_sbufferSize -= remaining_size;
 		} else {
 			debugC(DEBUG_SMUSH, "impossible ! : %p, %d, %d, %p(%d), %p(%d, %d)",
-				(const void *)this, _dataSize, _inData, _tbuffer, _tbufferSize, _sbuffer, _sbufferSize, _srbufferSize);
+				(const void *)this, _dataSize, _inData, (void *)_tbuffer, _tbufferSize, (void *)_sbuffer, _sbufferSize, _srbufferSize);
 			byte *old = _tbuffer;
 			int new_size = remaining_size + _tbufferSize;
 			_tbuffer = (byte *)malloc(new_size);
diff --git a/engines/sword2/interpreter.cpp b/engines/sword2/interpreter.cpp
index e7fb979..a131616 100644
--- a/engines/sword2/interpreter.cpp
+++ b/engines/sword2/interpreter.cpp
@@ -449,7 +449,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
 
 			Read16ip(parameter);
 			stack.push(_vm->_memory->encodePtr(localVars + parameter));
-			debug(9, "CP_PUSH_LOCAL_ADDR: &localVars[%d] => %p", parameter / 4, localVars + parameter);
+			debug(9, "CP_PUSH_LOCAL_ADDR: &localVars[%d] => %p", parameter / 4, (void *)(localVars + parameter));
 			break;
 		case CP_PUSH_STRING:
 			// Push the address of a string on to the stack
@@ -467,7 +467,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
 			Read32ip(parameter);
 			ptr = objectData + 4 + ResHeader::size() + ObjectHub::size() + parameter;
 			stack.push(_vm->_memory->encodePtr(ptr));
-			debug(9, "CP_PUSH_DEREFERENCED_STRUCTURE: %d => %p", parameter, ptr);
+			debug(9, "CP_PUSH_DEREFERENCED_STRUCTURE: %d => %p", parameter, (void *)ptr);
 			break;
 		case CP_POP_LOCAL_VAR32:
 			// Pop a value into a local word variable
diff --git a/engines/sword2/memory.cpp b/engines/sword2/memory.cpp
index 3919839..593bb67 100644
--- a/engines/sword2/memory.cpp
+++ b/engines/sword2/memory.cpp
@@ -225,7 +225,7 @@ void MemoryManager::memFree(byte *ptr) {
 	int16 idx = findExactPointerInIndex(ptr);
 
 	if (idx == -1) {
-		warning("Freeing non-allocated pointer %p", ptr);
+		warning("Freeing non-allocated pointer %p", (void *)ptr);
 		return;
 	}
 
diff --git a/engines/tinsel/anim.cpp b/engines/tinsel/anim.cpp
index 19e180b..e241c7c 100644
--- a/engines/tinsel/anim.cpp
+++ b/engines/tinsel/anim.cpp
@@ -43,7 +43,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
 
 	while (1) {	// repeat until a real image
 		debugC(DEBUG_DETAILED, kTinselDebugAnimations,
-		"DoNextFrame %ph index=%d, op=%xh", (byte *)pAnim, pAnim->scriptIndex,
+		"DoNextFrame %ph index=%d, op=%xh", (const void *)pAnim, pAnim->scriptIndex,
 		FROM_32(pAni[pAnim->scriptIndex].op));
 
 		switch ((int32)FROM_32(pAni[pAnim->scriptIndex].op)) {
@@ -217,7 +217,7 @@ void InitStepAnimScript(ANIM *pAnim, OBJECT *pAniObj, SCNHANDLE hNewScript, int
 		"InitStepAnimScript Object=(%d,%d,%xh) script=%xh aniSpeed=%d rec=%ph",
 		!pAniObj ? 0 : fracToInt(pAniObj->xPos),
 		!pAniObj ? 0 : fracToInt(pAniObj->yPos),
-		!pAniObj ? 0 : pAniObj->hImg, hNewScript, aniSpeed, (byte *)pAnim);
+		!pAniObj ? 0 : pAniObj->hImg, hNewScript, aniSpeed, (void *)pAnim);
 
 	pAnim->aniDelta = 1;		// will animate on next call to NextAnimRate
 	pAnim->pObject = pAniObj;	// set object to animate






More information about the Scummvm-git-logs mailing list