This informs the compiler that no code will ever run after an assertion failure (unless NDEBUG is defined), which increases accuracy of compiler warnings and static analyses.
From: Jinoh Kang jinoh.kang.kr@gmail.com
This informs the compiler that no code will ever run after an assertion failure (unless NDEBUG is defined), which increases accuracy of compiler warnings and static analyses. --- include/msvcrt/assert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/msvcrt/assert.h b/include/msvcrt/assert.h index 9a180f7e58d..26a9c0a7a5f 100644 --- a/include/msvcrt/assert.h +++ b/include/msvcrt/assert.h @@ -28,7 +28,7 @@ extern "C" { #ifdef NDEBUG #define assert(_expr) ((void)0) #else -_ACRTIMP void __cdecl _assert(const char *, const char *, unsigned int); +_ACRTIMP DECLSPEC_NORETURN void __cdecl _assert(const char *, const char *, unsigned int); #define assert(_expr) (void)((!!(_expr)) || (_assert(#_expr, __FILE__, __LINE__), 0)) #endif
Rationale: GCC complains of out-of-bounds access due to integer overflow in `dlls/inetmib1/main.c`.
`../wine/dlls/inetmib1/main.c:646:25: warning: array subscript 4294967295 is above array bounds of ‘MIB_IFROW[1]’ {aka ‘struct _MIB_IFROW[1]’} [-Warray-bounds]`
However, this is not the case as long as assert() is enabled.