mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 02:20:54 +00:00
[DDK][XDK]
- Do not evaluate the ASSERT macro's parameter before stringifying it CORE-7588 #resolve svn path=/trunk/; revision=61008
This commit is contained in:
parent
9bd70d2688
commit
154b389724
|
@ -11010,14 +11010,27 @@ RtlCheckBit(
|
||||||
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n", __FILE__, __LINE__, #exp), FALSE : TRUE)
|
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n", __FILE__, __LINE__, #exp), FALSE : TRUE)
|
||||||
|
|
||||||
#define RTL_SOFT_VERIFYMSG(msg, exp) \
|
#define RTL_SOFT_VERIFYMSG(msg, exp) \
|
||||||
(VOID)((!(exp)) ? \
|
((!(exp)) ? \
|
||||||
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n Message: %s\n", __FILE__, __LINE__, #exp, (msg)), FALSE : TRUE)
|
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n Message: %s\n", __FILE__, __LINE__, #exp, (msg)), FALSE : TRUE)
|
||||||
|
|
||||||
#define ASSERT(exp) ((void)RTL_VERIFY(exp))
|
/* The ASSERTs must be cast to void to avoid warnings about unused results.
|
||||||
#define ASSERTMSG(msg, exp) ((void)RTL_VERIFYMSG(msg, exp))
|
* We also cannot invoke the VERIFY versions because the indirection messes
|
||||||
|
* with stringify. */
|
||||||
|
#define ASSERT(exp) \
|
||||||
|
((VOID)((!(exp)) ? \
|
||||||
|
RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, NULL ), FALSE : TRUE))
|
||||||
|
|
||||||
#define RTL_SOFT_ASSERT(exp) ((void)RTL_SOFT_VERIFY(exp))
|
#define ASSERTMSG(msg, exp) \
|
||||||
#define RTL_SOFT_ASSERTMSG(msg, exp) ((void)RTL_SOFT_VERIFYMSG(msg, exp))
|
((VOID)((!(exp)) ? \
|
||||||
|
RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, (PCHAR)msg ), FALSE : TRUE))
|
||||||
|
|
||||||
|
#define RTL_SOFT_ASSERT(exp) \
|
||||||
|
((VOID)((!(exp)) ? \
|
||||||
|
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n", __FILE__, __LINE__, #exp), FALSE : TRUE))
|
||||||
|
|
||||||
|
#define RTL_SOFT_ASSERTMSG(msg, exp) \
|
||||||
|
((VOID)((!(exp)) ? \
|
||||||
|
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n Message: %s\n", __FILE__, __LINE__, #exp, (msg)), FALSE : TRUE))
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
# define __assert_annotationA(msg) __annotation(L"Debug", L"AssertFail", L ## msg)
|
# define __assert_annotationA(msg) __annotation(L"Debug", L"AssertFail", L ## msg)
|
||||||
|
|
|
@ -3076,14 +3076,27 @@ RtlCheckBit(
|
||||||
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n", __FILE__, __LINE__, #exp), FALSE : TRUE)
|
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n", __FILE__, __LINE__, #exp), FALSE : TRUE)
|
||||||
|
|
||||||
#define RTL_SOFT_VERIFYMSG(msg, exp) \
|
#define RTL_SOFT_VERIFYMSG(msg, exp) \
|
||||||
(VOID)((!(exp)) ? \
|
((!(exp)) ? \
|
||||||
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n Message: %s\n", __FILE__, __LINE__, #exp, (msg)), FALSE : TRUE)
|
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n Message: %s\n", __FILE__, __LINE__, #exp, (msg)), FALSE : TRUE)
|
||||||
|
|
||||||
#define ASSERT(exp) ((void)RTL_VERIFY(exp))
|
/* The ASSERTs must be cast to void to avoid warnings about unused results.
|
||||||
#define ASSERTMSG(msg, exp) ((void)RTL_VERIFYMSG(msg, exp))
|
* We also cannot invoke the VERIFY versions because the indirection messes
|
||||||
|
* with stringify. */
|
||||||
|
#define ASSERT(exp) \
|
||||||
|
((VOID)((!(exp)) ? \
|
||||||
|
RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, NULL ), FALSE : TRUE))
|
||||||
|
|
||||||
#define RTL_SOFT_ASSERT(exp) ((void)RTL_SOFT_VERIFY(exp))
|
#define ASSERTMSG(msg, exp) \
|
||||||
#define RTL_SOFT_ASSERTMSG(msg, exp) ((void)RTL_SOFT_VERIFYMSG(msg, exp))
|
((VOID)((!(exp)) ? \
|
||||||
|
RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, (PCHAR)msg ), FALSE : TRUE))
|
||||||
|
|
||||||
|
#define RTL_SOFT_ASSERT(exp) \
|
||||||
|
((VOID)((!(exp)) ? \
|
||||||
|
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n", __FILE__, __LINE__, #exp), FALSE : TRUE))
|
||||||
|
|
||||||
|
#define RTL_SOFT_ASSERTMSG(msg, exp) \
|
||||||
|
((VOID)((!(exp)) ? \
|
||||||
|
DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n Message: %s\n", __FILE__, __LINE__, #exp, (msg)), FALSE : TRUE))
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
# define __assert_annotationA(msg) __annotation(L"Debug", L"AssertFail", L ## msg)
|
# define __assert_annotationA(msg) __annotation(L"Debug", L"AssertFail", L ## msg)
|
||||||
|
|
Loading…
Reference in a new issue