New QPMS_UNTESTED macro

Former-commit-id: c8f3b6f43e735b6dfa45b747395a5ad97c350eed
This commit is contained in:
Marek Nečada 2019-06-23 20:30:14 +03:00
parent 3630edeff0
commit 2964c9ea99
1 changed files with 8 additions and 1 deletions

View File

@ -41,7 +41,6 @@ qpms_dbgmsg_flags qpms_dbgmsg_disable(qpms_dbgmsg_flags types);
qpms_dbgmsg_flags qpms_dbgmsg_enable(qpms_dbgmsg_flags types);
#define QPMS_WARN(msg, ...) qpms_warn_at_flf(__FILE__,__LINE__,__func__,msg, ##__VA_ARGS__)
#define QPMS_DEBUG(type, msg, ...) qpms_debug_at_flf(__FILE__,__LINE__,__func__,type,msg, ##__VA_ARGS__)
@ -52,6 +51,14 @@ qpms_dbgmsg_flags qpms_dbgmsg_enable(qpms_dbgmsg_flags types);
#define QPMS_WTF qpms_pr_error_at_flf(__FILE__,__LINE__,__func__,"Unexpected error.")
#define QPMS_UNTESTED {\
static bool already_bitched = false; \
if (!already_bitched) {\
qpms_warn_at_flf(__FILE__,__LINE__,__func__,"Warning: untested function/feature!")\
already_bitched = true;\
}\
}
#define QPMS_PR_ERROR(msg, ...) qpms_pr_error_at_flf(__FILE__,__LINE__,__func__,msg, ##__VA_ARGS__)
#define QPMS_ENSURE_SUCCESS(x) {if(x) QPMS_WTF;}