summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-06 18:15:41 +0100
committerMattes D <github@xoft.cz>2014-01-06 18:15:41 +0100
commit6dd44e623070425b8e242858a89b99a57c98b9d7 (patch)
tree34ffc9a7ed7e803270e86467429a1b99b5cb9eb9 /src/Globals.h
parentExported cWorld::BroadcastBlockAction(). (diff)
parentUndid the changes to cryptlib.cpp. (diff)
downloadcuberite-6dd44e623070425b8e242858a89b99a57c98b9d7.tar
cuberite-6dd44e623070425b8e242858a89b99a57c98b9d7.tar.gz
cuberite-6dd44e623070425b8e242858a89b99a57c98b9d7.tar.bz2
cuberite-6dd44e623070425b8e242858a89b99a57c98b9d7.tar.lz
cuberite-6dd44e623070425b8e242858a89b99a57c98b9d7.tar.xz
cuberite-6dd44e623070425b8e242858a89b99a57c98b9d7.tar.zst
cuberite-6dd44e623070425b8e242858a89b99a57c98b9d7.zip
Diffstat (limited to 'src/Globals.h')
-rw-r--r--src/Globals.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Globals.h b/src/Globals.h
index 58badf4dd..a761da404 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -14,7 +14,19 @@
#pragma warning(disable:4481)
// Disable some warnings that we don't care about:
- #pragma warning(disable:4100)
+ #pragma warning(disable:4100) // Unreferenced formal parameter
+
+ // Useful warnings from warning level 4:
+ #pragma warning(3 : 4189) // Local variable is initialized but not referenced
+ #pragma warning(3 : 4702) // Unreachable code
+ #pragma warning(3 : 4245) // Conversion from 'type1' to 'type2', signed/unsigned mismatch
+ #pragma warning(3 : 4389) // Signed/unsigned mismatch
+ #pragma warning(3 : 4701) // Potentially unitialized local variable used
+ #pragma warning(3 : 4244) // Conversion from 'type1' to 'type2', possible loss of data
+ #pragma warning(3 : 4310) // Cast truncates constant value
+ #pragma warning(3 : 4505) // Unreferenced local function has been removed
+ #pragma warning(3 : 4127) // Conditional expression is constant
+ #pragma warning(3 : 4706) // Assignment within conditional expression
#define OBSOLETE __declspec(deprecated)
@@ -192,7 +204,7 @@ typedef unsigned short UInt16;
#ifdef _DEBUG
#define ASSERT( x ) ( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), assert(0), 0 ) )
#else
- #define ASSERT(x) ((void)0)
+ #define ASSERT(x) ((void)(x))
#endif
// Pretty much the same as ASSERT() but stays in Release builds