Commit 5d5d751c authored by Mark Andrews's avatar Mark Andrews

teach cppcheck that _assert_int_equal and _assert_int_not_equal don't return on failure

parent ce52ac11
Pipeline #15514 passed with stages
in 19 minutes and 58 seconds
......@@ -219,6 +219,10 @@ extern void mock_assert(const int result, const char* const expression,
(mock_assert(0, #expression, __FILE__, __LINE__), abort()) : (void)0)
#define _assert_true(c, e, f, l) \
((c) ? (void)0 : (_assert_true(0, e, f, l), abort()))
#define _assert_int_equal(a, b, f, l) \
(((a) == (b)) ? (void)0 : (_assert_int_equal(a, b, f, l), abort()))
#define _assert_int_not_equal(a, b, f, l) \
(((a) != (b)) ? (void)0 : (_assert_int_not_equal(a, b, f, l), abort()))
#else /* UNIT_TESTING */
/*
* Assertions
......
......@@ -11,9 +11,10 @@
#if HAVE_CMOCKA
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......
......@@ -11,9 +11,10 @@
#if HAVE_CMOCKA
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdlib.h>
#include <string.h>
#include <sys/errno.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment