Author: akhaldi
Date: Sat Apr 6 10:36:24 2013
New Revision: 58686
URL:
http://svn.reactos.org/svn/reactos?rev=58686&view=rev
Log:
[PSDK]
* Add DEFAULT_UNREACHABLE macro to ntdef.h.
* Add break to the last case.
Modified:
trunk/reactos/include/psdk/ntdef.h
trunk/reactos/include/psdk/winnt.h
Modified: trunk/reactos/include/psdk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=5…
==============================================================================
--- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Sat Apr 6 10:36:24 2013
@@ -699,6 +699,15 @@
/* C_ASSERT Definition */
#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
+
+/* Eliminate Microsoft C/C++ compiler warning 4715 */
+#if defined(_MSC_VER) && (_MSC_VER > 1200)
+# define DEFAULT_UNREACHABLE default: __assume(0)
+#elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) ||
((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
+# define DEFAULT_UNREACHABLE default: __builtin_unreachable()
+#else
+# define DEFAULT_UNREACHABLE default: break
+#endif
#define VER_WORKSTATION_NT 0x40000000
#define VER_SERVER_NT 0x80000000
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=5…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sat Apr 6 10:36:24 2013
@@ -422,7 +422,7 @@
#elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) ||
((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
# define DEFAULT_UNREACHABLE default: __builtin_unreachable()
#else
-# define DEFAULT_UNREACHABLE default:
+# define DEFAULT_UNREACHABLE default: break
#endif
#include "intrin.h"