[Scummvm-cvs-logs] SF.net SVN: scummvm: [32540] scummvm/trunk
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Jun 4 19:20:26 CEST 2008
Revision: 32540
http://scummvm.svn.sourceforge.net/scummvm/?rev=32540&view=rev
Author: lordhoto
Date: 2008-06-04 10:20:25 -0700 (Wed, 04 Jun 2008)
Log Message:
-----------
- Removed -Wconversion from compiler options for g++ 4.3, it's behavior has fundamently changed in g++ 4.3
- Added -Wno-empty-body and -Wno-parentheses as compiler flags for g++ 4.3 for *now* (we should think of removing -Wparentheses though)
- Fixed some warnings for g++ 4.3 (only for the engines I'm using)
Modified Paths:
--------------
scummvm/trunk/Makefile
scummvm/trunk/backends/platform/sdl/events.cpp
scummvm/trunk/backends/platform/sdl/sdl.cpp
scummvm/trunk/common/rect.h
scummvm/trunk/configure
scummvm/trunk/engines/saga/detection.cpp
scummvm/trunk/engines/saga/saga.h
scummvm/trunk/engines/sword2/header.h
scummvm/trunk/engines/sword2/object.h
scummvm/trunk/engines/sword2/screen.h
scummvm/trunk/gui/eval.cpp
Modified: scummvm/trunk/Makefile
===================================================================
--- scummvm/trunk/Makefile 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/Makefile 2008-06-04 17:20:25 UTC (rev 32540)
@@ -24,7 +24,7 @@
# Turn off some annoying and not-so-useful warnings
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
# Enable even more warnings...
-CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion
+CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings
# Disable RTTI and exceptions, and enabled checking of pointers returned by "new"
Modified: scummvm/trunk/backends/platform/sdl/events.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/events.cpp 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/backends/platform/sdl/events.cpp 2008-06-04 17:20:25 UTC (rev 32540)
@@ -148,7 +148,7 @@
_km.y_down_count = 1;
}
- SDL_WarpMouse(_km.x, _km.y);
+ SDL_WarpMouse((Uint16)_km.x, (Uint16)_km.y);
}
}
}
Modified: scummvm/trunk/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl.cpp 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/backends/platform/sdl/sdl.cpp 2008-06-04 17:20:25 UTC (rev 32540)
@@ -406,7 +406,7 @@
// about 1/32th of a second. Note that it must be a power of two.
// So e.g. at 22050 Hz, we request a sample buffer size of 2048.
int samples = 8192;
- while (32 * samples >= _samplesPerSec) {
+ while (16 * samples >= _samplesPerSec) {
samples >>= 1;
}
Modified: scummvm/trunk/common/rect.h
===================================================================
--- scummvm/trunk/common/rect.h 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/common/rect.h 2008-06-04 17:20:25 UTC (rev 32540)
@@ -61,7 +61,7 @@
if (diffy >= 0x1000)
return 0xFFFFFF;
- return diffx*diffx + diffy*diffy;
+ return uint(diffx*diffx + diffy*diffy);
}
};
Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/configure 2008-06-04 17:20:25 UTC (rev 32540)
@@ -943,6 +943,12 @@
add_line_to_config_mk 'HAVE_GCC3 = 1'
fi;
+if test "$_cxx_major" -ge "4" && test "$_cxx_minor" -ge "3" ; then
+ CXXFLAGS="$CXXFLAGS -Wno-parentheses -Wno-empty-body"
+else
+ CXXFLAGS="$CXXFLAGS -Wconversion"
+fi;
+
add_to_config_mk_if_no $_build_hq_scalers 'DISABLE_HQ_SCALERS = 1'
add_to_config_mk_if_no $_build_scalers 'DISABLE_SCALERS = 1'
Modified: scummvm/trunk/engines/saga/detection.cpp
===================================================================
--- scummvm/trunk/engines/saga/detection.cpp 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/engines/saga/detection.cpp 2008-06-04 17:20:25 UTC (rev 32540)
@@ -54,8 +54,8 @@
const GamePatchDescription *patchDescriptions;
};
-const bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; }
-const bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); }
+bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; }
+bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); }
const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; }
const GameSoundInfo *SagaEngine::getVoiceInfo() const { return _gameDescription->voiceInfo; }
const GameSoundInfo *SagaEngine::getSfxInfo() const { return _gameDescription->sfxInfo; }
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/engines/saga/saga.h 2008-06-04 17:20:25 UTC (rev 32540)
@@ -580,15 +580,15 @@
_mouseClickCount = 0;
}
- const bool leftMouseButtonPressed() const {
+ bool leftMouseButtonPressed() const {
return _leftMouseButtonPressed;
}
- const bool rightMouseButtonPressed() const {
+ bool rightMouseButtonPressed() const {
return _rightMouseButtonPressed;
}
- const bool mouseButtonPressed() const {
+ bool mouseButtonPressed() const {
return _leftMouseButtonPressed || _rightMouseButtonPressed;
}
@@ -622,8 +622,8 @@
public:
bool initGame(void);
- const bool isBigEndian() const;
- const bool isMacResources() const;
+ bool isBigEndian() const;
+ bool isMacResources() const;
const GameResourceDescription *getResourceDescription();
const GameSoundInfo *getVoiceInfo() const;
const GameSoundInfo *getSfxInfo() const;
Modified: scummvm/trunk/engines/sword2/header.h
===================================================================
--- scummvm/trunk/engines/sword2/header.h 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/engines/sword2/header.h 2008-06-04 17:20:25 UTC (rev 32540)
@@ -56,7 +56,7 @@
// compressed)
byte name[NAME_LEN]; // Name of object
- static const int size() {
+ static int size() {
return 44;
}
@@ -152,7 +152,7 @@
uint8 feetEndDir; // Direction to start in after running anim
uint16 blend;
- static const int size() {
+ static int size() {
return 15;
}
@@ -209,7 +209,7 @@
uint8 frameType; // 0 = print sprite normally with top-left
// corner at (x,y), otherwise see below...
- static const int size() {
+ static int size() {
return 9;
}
@@ -250,7 +250,7 @@
uint16 width; // Dimensions of frame
uint16 height;
- static const int size() {
+ static int size() {
return 8;
}
@@ -299,7 +299,7 @@
uint32 paletteTable;
uint32 maskOffset;
- static const int size() {
+ static int size() {
return 36;
}
@@ -339,7 +339,7 @@
uint16 height;
uint16 noLayers; // number of layer areas
- static const int size() {
+ static int size() {
return 6;
}
@@ -374,7 +374,7 @@
uint32 offset; // where to find mask data (from start of
// standard file header)
- static const int size() {
+ static int size() {
return 16;
}
@@ -436,7 +436,7 @@
_addr = NULL;
}
- static const int size() {
+ static int size() {
return 44;
}
@@ -479,7 +479,7 @@
uint32 noOfLines; // how many lines of text are there in this
// module
- static const int size() {
+ static int size() {
return 4;
}
Modified: scummvm/trunk/engines/sword2/object.h
===================================================================
--- scummvm/trunk/engines/sword2/object.h 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/engines/sword2/object.h 2008-06-04 17:20:25 UTC (rev 32540)
@@ -48,7 +48,7 @@
int32 priority;
int32 pointer; // type (or resource id?) of pointer used over this area
- static const int size() {
+ static int size() {
return 24;
}
@@ -91,7 +91,7 @@
_addr = addr;
}
- static const int size() {
+ static int size() {
return 8;
}
@@ -139,7 +139,7 @@
_addr = addr;
}
- static const int size() {
+ static int size() {
return 12;
}
@@ -178,7 +178,7 @@
_addr = addr;
}
- static const int size() {
+ static int size() {
return 36;
}
@@ -240,7 +240,7 @@
_addr = addr;
}
- static const int size() {
+ static int size() {
return 56;
}
@@ -291,7 +291,7 @@
int32 dx[8 * (12 + 1)]; // walk step distances in x direction
int32 dy[8 * (12 + 1)]; // walk step distances in y direction
- static const int size() {
+ static int size() {
return 916;
}
Modified: scummvm/trunk/engines/sword2/screen.h
===================================================================
--- scummvm/trunk/engines/sword2/screen.h 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/engines/sword2/screen.h 2008-06-04 17:20:25 UTC (rev 32540)
@@ -187,7 +187,7 @@
// The dimensions are followed by an offset table, but we don't know in
// advance how big it is. See initializeBackgroundLayer().
- static const int size() {
+ static int size() {
return 4;
}
Modified: scummvm/trunk/gui/eval.cpp
===================================================================
--- scummvm/trunk/gui/eval.cpp 2008-06-04 17:02:25 UTC (rev 32539)
+++ scummvm/trunk/gui/eval.cpp 2008-06-04 17:20:25 UTC (rev 32540)
@@ -102,7 +102,7 @@
char op;
op = 0;
- if ((_tokenType == tDelimiter) && *_token == '+' || *_token == '-') {
+ if ((_tokenType == tDelimiter) && (*_token == '+' || *_token == '-')) {
op = *_token;
getToken();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list