mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
CINE: Fix GCC Compiler Warnings
These are mainly signed vs. unsigned comparison warnings apart from a set, but unused variable in the main loop code which can be removed.
This commit is contained in:
parent
1e678f136c
commit
f8f0f09ef2
@ -199,7 +199,7 @@ int loadSet(const char *resourceName, int16 idx, int16 frameIndex = -1);
|
||||
void checkAnimDataTableBounds(int entry) {
|
||||
if (entry < 0) {
|
||||
error("Out of free animation space");
|
||||
} else if (entry >= g_cine->_animDataTable.size()) {
|
||||
} else if (entry >= (int)g_cine->_animDataTable.size()) {
|
||||
error("Animation entry (%d) out of bounds", entry);
|
||||
}
|
||||
}
|
||||
@ -209,7 +209,7 @@ int16 fixAnimDataTableEndFrame(int entry, int16 startFrame, int16 endFrame) {
|
||||
|
||||
// Ensure that a non-empty range [entry, entry + endFrame - startFrame) stays in bounds
|
||||
if (endFrame > startFrame &&
|
||||
entry + (endFrame - startFrame - 1) >= g_cine->_animDataTable.size()) {
|
||||
entry + (endFrame - startFrame - 1) >= (int)g_cine->_animDataTable.size()) {
|
||||
warning("Restricting out of bounds animation data table write to in bounds");
|
||||
return (int16)(g_cine->_animDataTable.size() - entry + startFrame);
|
||||
} else {
|
||||
|
@ -410,7 +410,6 @@ void purgeSeqList() {
|
||||
}
|
||||
|
||||
void CineEngine::mainLoop(int bootScriptIdx) {
|
||||
bool playerAction;
|
||||
byte di;
|
||||
|
||||
if (_preLoad == false) {
|
||||
@ -540,8 +539,6 @@ void CineEngine::mainLoop(int bootScriptIdx) {
|
||||
removeMessages();
|
||||
|
||||
if (waitForPlayerClick) {
|
||||
playerAction = false;
|
||||
|
||||
_messageLen <<= 3;
|
||||
if (_messageLen < 800)
|
||||
_messageLen = 800;
|
||||
|
@ -225,7 +225,7 @@ int16 findFileInBundle(const char *fileName) {
|
||||
// Prefer current disk's resource file
|
||||
Common::Array<VolumeResource> volRes = it->_value;
|
||||
VolumeResource match = volRes[0];
|
||||
for (int i = 0; i < volRes.size(); i++) {
|
||||
for (uint i = 0; i < volRes.size(); i++) {
|
||||
if (volRes[i].diskNum == currentDisk) {
|
||||
match = volRes[i];
|
||||
break;
|
||||
|
@ -833,7 +833,7 @@ void MidiSoundDriverH32::selectInstrument2(int channel, int timbreGroup, int tim
|
||||
|
||||
byte checkSum = 0;
|
||||
|
||||
for (int i = 4; i < sizeof(sysEx) - 1; ++i)
|
||||
for (uint i = 4; i < sizeof(sysEx) - 1; ++i)
|
||||
checkSum += sysEx[i];
|
||||
|
||||
sysEx[sizeof(sysEx) - 1] = 0x80 - (checkSum & 0x7F);
|
||||
@ -872,7 +872,7 @@ void MidiSoundDriverH32::selectInstrument3(int channel, int offsetMode, int timb
|
||||
|
||||
byte checkSum = 0;
|
||||
|
||||
for (int i = 4; i < sizeof(sysEx) - 1; ++i)
|
||||
for (uint i = 4; i < sizeof(sysEx) - 1; ++i)
|
||||
checkSum += sysEx[i];
|
||||
|
||||
sysEx[sizeof(sysEx) - 1] = 0x80 - (checkSum & 0x7F);
|
||||
@ -934,7 +934,7 @@ void MidiSoundDriverH32::selectInstrument5(int messageNum) {
|
||||
|
||||
memset(sysEx + 7, 0x20, 20);
|
||||
|
||||
if (messageNum >= 0 && messageNum < g_cine->_messageTable.size()) {
|
||||
if (messageNum >= 0 && messageNum < (int)g_cine->_messageTable.size()) {
|
||||
Common::String msg = g_cine->_messageTable[messageNum];
|
||||
memcpy(sysEx + 7, msg.c_str(), MIN<int>(20, msg.size()));
|
||||
}
|
||||
@ -945,7 +945,7 @@ void MidiSoundDriverH32::selectInstrument5(int messageNum) {
|
||||
|
||||
byte checkSum = 0;
|
||||
|
||||
for (int i = 4; i < sizeof(sysEx) - 1; ++i)
|
||||
for (uint i = 4; i < sizeof(sysEx) - 1; ++i)
|
||||
checkSum += sysEx[i];
|
||||
|
||||
sysEx[sizeof(sysEx) - 1] = 0x80 - (checkSum & 0x7F);
|
||||
|
Loading…
x
Reference in New Issue
Block a user