summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-07 13:57:34 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-07 13:57:34 +0100
commit0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f (patch)
treed2593b129bf0e83d72937cf52e8a9283c85be46a /src/Globals.h
parentMerge branch 'master' of github.com:mc-server/MCServer (diff)
parentAdded Base64Encode(). (diff)
downloadcuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.gz
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.bz2
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.lz
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.xz
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.tar.zst
cuberite-0b79ad0d5dd9d2ddcbff4f7351ebd83ce22fb53f.zip
Diffstat (limited to 'src/Globals.h')
-rw-r--r--src/Globals.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Globals.h b/src/Globals.h
index 58badf4dd..1765c53d8 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -14,7 +14,21 @@
#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 : 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
+
+ // 2014_01_06 xoft: Disabled this warning because MSVC is stupid and reports it in obviously wrong places
+ // #pragma warning(3 : 4244) // Conversion from 'type1' to 'type2', possible loss of data
#define OBSOLETE __declspec(deprecated)
@@ -192,7 +206,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