mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-12 03:36:42 +00:00
JANITORIAL: Fix clang printf warnings
This commit is contained in:
parent
afd4b82a8a
commit
d8045c6727
@ -204,7 +204,7 @@ bool MidiParser_SMF::loadMusic(byte *data, uint32 size) {
|
|||||||
int tracksRead = 0;
|
int tracksRead = 0;
|
||||||
while (tracksRead < _numTracks) {
|
while (tracksRead < _numTracks) {
|
||||||
if (memcmp(pos, "MTrk", 4) && !isGMF) {
|
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]);
|
warning("Hit invalid block '%c%c%c%c' while scanning for track locations", pos[0], pos[1], pos[2], pos[3]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ uint16 addAni(uint16 param1, uint16 objIdx, const int8 *ptr, SeqListElement &ele
|
|||||||
int16 di;
|
int16 di;
|
||||||
|
|
||||||
debug(5, "addAni: param1 = %d, objIdx = %d, ptr = %p, element.var8 = %d, element.var14 = %d param3 = %d",
|
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
|
// In the original an error string is set and 0 is returned if the following doesn't hold
|
||||||
assert(ptr);
|
assert(ptr);
|
||||||
|
@ -1406,7 +1406,7 @@ int32 Insane::smush_setupSanWithFlu(const char *filename, int32 setupsan2, int32
|
|||||||
int32 offset;
|
int32 offset;
|
||||||
|
|
||||||
debugC(DEBUG_INSANE, "smush_setupSanWithFlu(%s, %d, %d, %d, %d, %p, %d)", filename, setupsan2,
|
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;
|
_smush_setupsan1 = setupsan1;
|
||||||
|
|
||||||
|
@ -748,7 +748,7 @@ byte *ScummEngine::getResourceAddress(ResType type, ResId idx) {
|
|||||||
|
|
||||||
_res->setResourceCounter(type, idx, 1);
|
_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;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ void ImuseChannel::decode() {
|
|||||||
_sbufferSize -= remaining_size;
|
_sbufferSize -= remaining_size;
|
||||||
} else {
|
} else {
|
||||||
debugC(DEBUG_SMUSH, "impossible ! : %p, %d, %d, %p(%d), %p(%d, %d)",
|
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;
|
byte *old = _tbuffer;
|
||||||
int new_size = remaining_size + _tbufferSize;
|
int new_size = remaining_size + _tbufferSize;
|
||||||
_tbuffer = (byte *)malloc(new_size);
|
_tbuffer = (byte *)malloc(new_size);
|
||||||
|
@ -449,7 +449,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
|
|||||||
|
|
||||||
Read16ip(parameter);
|
Read16ip(parameter);
|
||||||
stack.push(_vm->_memory->encodePtr(localVars + 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;
|
break;
|
||||||
case CP_PUSH_STRING:
|
case CP_PUSH_STRING:
|
||||||
// Push the address of a string on to the stack
|
// 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);
|
Read32ip(parameter);
|
||||||
ptr = objectData + 4 + ResHeader::size() + ObjectHub::size() + parameter;
|
ptr = objectData + 4 + ResHeader::size() + ObjectHub::size() + parameter;
|
||||||
stack.push(_vm->_memory->encodePtr(ptr));
|
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;
|
break;
|
||||||
case CP_POP_LOCAL_VAR32:
|
case CP_POP_LOCAL_VAR32:
|
||||||
// Pop a value into a local word variable
|
// Pop a value into a local word variable
|
||||||
|
@ -225,7 +225,7 @@ void MemoryManager::memFree(byte *ptr) {
|
|||||||
int16 idx = findExactPointerInIndex(ptr);
|
int16 idx = findExactPointerInIndex(ptr);
|
||||||
|
|
||||||
if (idx == -1) {
|
if (idx == -1) {
|
||||||
warning("Freeing non-allocated pointer %p", ptr);
|
warning("Freeing non-allocated pointer %p", (void *)ptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
|
|||||||
|
|
||||||
while (1) { // repeat until a real image
|
while (1) { // repeat until a real image
|
||||||
debugC(DEBUG_DETAILED, kTinselDebugAnimations,
|
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));
|
FROM_32(pAni[pAnim->scriptIndex].op));
|
||||||
|
|
||||||
switch ((int32)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",
|
"InitStepAnimScript Object=(%d,%d,%xh) script=%xh aniSpeed=%d rec=%ph",
|
||||||
!pAniObj ? 0 : fracToInt(pAniObj->xPos),
|
!pAniObj ? 0 : fracToInt(pAniObj->xPos),
|
||||||
!pAniObj ? 0 : fracToInt(pAniObj->yPos),
|
!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->aniDelta = 1; // will animate on next call to NextAnimRate
|
||||||
pAnim->pObject = pAniObj; // set object to animate
|
pAnim->pObject = pAniObj; // set object to animate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user