diff options
author | Einar Johan Trøan Sømåen | 2012-07-27 18:13:42 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-27 18:13:42 +0200 |
commit | f6ac34ab9a48b702e3c3678cfd208ebeb2517dc4 (patch) | |
tree | 936197f2b55fae79012acf37b35ace0916257037 /engines/wintermute/base | |
parent | 6262a2ac8751b1bfff7becc8cf181ab9dd16bf87 (diff) | |
download | scummvm-rg350-f6ac34ab9a48b702e3c3678cfd208ebeb2517dc4.tar.gz scummvm-rg350-f6ac34ab9a48b702e3c3678cfd208ebeb2517dc4.tar.bz2 scummvm-rg350-f6ac34ab9a48b702e3c3678cfd208ebeb2517dc4.zip |
WINTERMUTE: Get rid of almost all LLVM GCC 4.2 warnings.
Diffstat (limited to 'engines/wintermute/base')
8 files changed, 15 insertions, 14 deletions
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp index f1320b814b..5bad96d65e 100644 --- a/engines/wintermute/base/base_file_manager.cpp +++ b/engines/wintermute/base/base_file_manager.cpp @@ -253,8 +253,8 @@ Common::SeekableReadStream *BaseFileManager::openPkgFile(const Common::String &f strcpy(fileName, upcName.c_str());
// correct slashes
- for (int32 i = 0; i < upcName.size(); i++) {
- if (upcName[i] == '/') {
+ for (uint32 i = 0; i < upcName.size(); i++) {
+ if (upcName[(int32)i] == '/') {
upcName.setChar('\\', (uint32)i);
}
}
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp index 995b996b33..ce7c66b7dd 100644 --- a/engines/wintermute/base/base_persistence_manager.cpp +++ b/engines/wintermute/base/base_persistence_manager.cpp @@ -492,7 +492,7 @@ float BasePersistenceManager::getFloat() { }
void BasePersistenceManager::putDouble(double val) {
- Common::String str = Common::String::format("F%f", val);
+ Common::String str = Common::String::format("D%f", val);
str.format("D%f", val);
_saveStream->writeUint32LE(str.size());
_saveStream->writeString(str);
@@ -500,10 +500,10 @@ void BasePersistenceManager::putDouble(double val) { double BasePersistenceManager::getDouble() {
char *str = getString();
- double value = 0.0f;
- int ret = sscanf(str, "F%f", &value);
+ float value = 0.0f; // TODO: Do we ever really need to carry a full double-precision number?
+ int ret = sscanf(str, "D%f", &value);
if (ret != 1) {
- warning("%s not parsed as float", str);
+ warning("%s not parsed as double", str);
}
delete[] str;
return value;
diff --git a/engines/wintermute/base/base_surface_storage.cpp b/engines/wintermute/base/base_surface_storage.cpp index 3d878b1346..689066eb6e 100644 --- a/engines/wintermute/base/base_surface_storage.cpp +++ b/engines/wintermute/base/base_surface_storage.cpp @@ -73,7 +73,7 @@ bool BaseSurfaceStorage::initLoop() { break;
}
- if (_surfaces[i]->_lifeTime > 0 && _surfaces[i]->_valid && _gameRef->_liveTimer - _surfaces[i]->_lastUsedTime >= _surfaces[i]->_lifeTime) {
+ if (_surfaces[i]->_lifeTime > 0 && (int)(_surfaces[i]->_valid && _gameRef->_liveTimer - _surfaces[i]->_lastUsedTime) >= _surfaces[i]->_lifeTime) {
//_gameRef->QuickMessageForm("Invalidating: %s", _surfaces[i]->_filename);
_surfaces[i]->invalidate();
}
diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp index 152e08273d..ed7c13a54d 100644 --- a/engines/wintermute/base/font/base_font_bitmap.cpp +++ b/engines/wintermute/base/font/base_font_bitmap.cpp @@ -174,7 +174,7 @@ int BaseFontBitmap::textHeightDraw(byte *text, int x, int y, int width, TTextAli longLine = true;
}
- if (str.size() == (index + 1) || (maxLength >= 0 && index == maxLength - 1)) {
+ if ((int)str.size() == (index + 1) || (maxLength >= 0 && index == maxLength - 1)) {
done = true;
if (!newLine) {
end = index;
diff --git a/engines/wintermute/base/gfx/base_renderer.cpp b/engines/wintermute/base/gfx/base_renderer.cpp index 168aa75d91..3a29bf542d 100644 --- a/engines/wintermute/base/gfx/base_renderer.cpp +++ b/engines/wintermute/base/gfx/base_renderer.cpp @@ -111,7 +111,7 @@ BaseObject *BaseRenderer::getObjectAt(int x, int y) { //////////////////////////////////////////////////////////////////////////
void BaseRenderer::deleteRectList() {
- for (int i = 0; i < _rectList.size(); i++) {
+ for (uint32 i = 0; i < _rectList.size(); i++) {
delete _rectList[i];
}
_rectList.clear();
diff --git a/engines/wintermute/base/particles/part_particle.cpp b/engines/wintermute/base/particles/part_particle.cpp index 27dbe9999c..0c0ec08ba9 100644 --- a/engines/wintermute/base/particles/part_particle.cpp +++ b/engines/wintermute/base/particles/part_particle.cpp @@ -199,7 +199,7 @@ bool PartParticle::display(PartEmitter *emitter) { }
_sprite->getCurrentFrame();
- return _sprite->display(_pos.x, _pos.y,
+ return _sprite->display((int)_pos.x, (int)_pos.y,
NULL,
_scale, _scale,
BYTETORGBA(255, 255, 255, _currentAlpha),
diff --git a/engines/wintermute/base/scriptables/script_ext_file.cpp b/engines/wintermute/base/scriptables/script_ext_file.cpp index 4eeabca04d..9736ae3ee2 100644 --- a/engines/wintermute/base/scriptables/script_ext_file.cpp +++ b/engines/wintermute/base/scriptables/script_ext_file.cpp @@ -211,8 +211,8 @@ bool SXFile::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Copy") == 0) {
stack->correctParams(2);
- const char *dest = stack->pop()->getString();
- bool overwrite = stack->pop()->getBool(true);
+ /* const char *dest = */ stack->pop()->getString();
+ /* bool overwrite = */ stack->pop()->getBool(true);
close();
error("SXFile-Method: Copy not supported");
@@ -601,7 +601,7 @@ bool SXFile::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, else if (strcmp(name, "WriteDouble") == 0) {
error("SXFile::WriteDouble - Not endian safe yet");
stack->correctParams(1);
- double val = stack->pop()->getFloat();
+ /* double val = */ stack->pop()->getFloat();
if (_textMode || !_writeFile) {
script->runtimeError("File.%s: File must be open for writing in binary mode.", name);
diff --git a/engines/wintermute/base/sound/base_sound.cpp b/engines/wintermute/base/sound/base_sound.cpp index 9bea6be770..8a139ead4f 100644 --- a/engines/wintermute/base/sound/base_sound.cpp +++ b/engines/wintermute/base/sound/base_sound.cpp @@ -268,7 +268,8 @@ bool BaseSound::setPrivateVolume(int volume) { if (!_sound) {
return STATUS_FAILED;
} else {
- return _sound->_privateVolume = volume;
+ _sound->_privateVolume = volume;
+ return STATUS_OK;
}
}
|