test: force an unnecessary abort after litest_abort_msg()

This is the easy way to get static analyzers to understand that calling
litest_abort_msg() always fails.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1109>
This commit is contained in:
Peter Hutterer 2024-12-22 16:15:12 +10:00 committed by Marge Bot
parent 7efec8f2e7
commit f9f9bccba2

View file

@ -157,9 +157,11 @@ litest_fail_comparison_str(const char *file,
#cond, __VA_ARGS__); \
} while(0)
#define litest_abort_msg(...) \
#define litest_abort_msg(...) {\
litest_fail_condition(__FILE__, __LINE__, __func__, \
"aborting", __VA_ARGS__); \
abort(); \
}
#define litest_assert_notnull(cond) \
do { \