summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--SetFlags.cmake2
-rw-r--r--src/Bindings/LuaState.h2
-rw-r--r--src/DeadlockDetect.h2
-rw-r--r--src/Globals.h11
4 files changed, 12 insertions, 5 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake
index 42cfa6769..e636c5c95 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -198,7 +198,7 @@ macro(set_exe_flags)
add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow")
add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations")
add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough")
- add_flags_cxx("-Wno-missing-noreturn -Wno-error=unreachable-code -Wno-error=undef")
+ add_flags_cxx("-Wno-error=unreachable-code -Wno-error=undef")
endif()
endif()
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h
index 73f9629cb..f5cb8379d 100644
--- a/src/Bindings/LuaState.h
+++ b/src/Bindings/LuaState.h
@@ -200,7 +200,7 @@ public:
void Push(const HTTPTemplateRequest * a_Request);
void Push(cTNTEntity * a_TNTEntity);
void Push(Vector3i * a_Vector);
- void Push(void * a_Ptr);
+ NORETURNDEBUG void Push(void * a_Ptr);
void Push(cHopperEntity * a_Hopper);
void Push(cBlockEntity * a_BlockEntity);
diff --git a/src/DeadlockDetect.h b/src/DeadlockDetect.h
index cb2309169..6aa98acbb 100644
--- a/src/DeadlockDetect.h
+++ b/src/DeadlockDetect.h
@@ -60,7 +60,7 @@ protected:
void CheckWorldAge(const AString & a_WorldName, Int64 a_Age);
/// Called when a deadlock is detected. Aborts the server.
- void DeadlockDetected(void);
+ NORETURN void DeadlockDetected(void);
} ;
diff --git a/src/Globals.h b/src/Globals.h
index a5b9d391a..3e62832b7 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -46,7 +46,7 @@
#define SIZE_T_FMT_PRECISION(x) "%" #x "Iu"
#define SIZE_T_FMT_HEX "%Ix"
- #define NORETURN __declspec(noreturn)
+ #define NORETURN __declspec(noreturn)
#elif defined(__GNUC__)
@@ -72,7 +72,7 @@
#define SIZE_T_FMT_PRECISION(x) "%" #x "zu"
#define SIZE_T_FMT_HEX "%zx"
- #define NORETURN __attribute((__noreturn__))
+ #define NORETURN __attribute((__noreturn__))
#else
@@ -98,6 +98,13 @@
#endif
+#ifdef _DEBUG
+ #define NORETURNDEBUG NORETURN
+#else
+ #define NORETURNDEBUG
+#endif
+
+
#include <stddef.h>