mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[winpr,assert] always compile in assert helper
This commit is contained in:
@@ -34,22 +34,28 @@
|
||||
winpr_int_assert(#cond, (file), (fkt), (line)); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
#define winpr_internal_assert(cond, file, fkt, line) assert(cond)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
extern WINPR_NORETURN(void winpr_int_assert(const char* condstr, const char* file,
|
||||
const char* fkt, size_t line));
|
||||
/* this function meant only to be used by WINPR_ASSERT
|
||||
* it needs to be exported as our assert implementation calls this for debug logging.
|
||||
*
|
||||
* also export when WITH_VERBOSE_WINPR_ASSERT is disabled as other software might compile with
|
||||
* it enabled
|
||||
*/
|
||||
WINPR_API WINPR_NORETURN(void winpr_int_assert(const char* condstr, const char* file,
|
||||
const char* fkt, size_t line));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define winpr_internal_assert(cond, file, fkt, line) assert(cond)
|
||||
#endif
|
||||
|
||||
#define WINPR_ASSERT_AT(cond, file, fkt, line) \
|
||||
do \
|
||||
{ \
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <winpr/wlog.h>
|
||||
#include <winpr/debug.h>
|
||||
|
||||
#if defined(WITH_VERBOSE_WINPR_ASSERT) && (WITH_VERBOSE_WINPR_ASSERT != 0)
|
||||
void winpr_int_assert(const char* condstr, const char* file, const char* fkt, size_t line)
|
||||
{
|
||||
wLog* _log_cached_ptr = WLog_Get("com.freerdp.winpr.assert");
|
||||
@@ -30,4 +29,3 @@ void winpr_int_assert(const char* condstr, const char* file, const char* fkt, si
|
||||
winpr_log_backtrace_ex(_log_cached_ptr, WLOG_FATAL, 20);
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user