Commit 1bbba527 authored by Mark Andrews's avatar Mark Andrews

Merge branch 'cppcheck-and-cmocka-false-positive' into 'master'

teach clang analyser that _assert_int_equal and _assert_int_not_equal don't return on failure

See merge request !1807
parents ce52ac11 5d5d751c
Pipeline #15516 passed with stages
in 55 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