mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
teach cppcheck that _assert_int_equal and _assert_int_not_equal don't return on failure
This commit is contained in:
@@ -219,6 +219,10 @@ extern void mock_assert(const int result, const char* const expression,
|
|||||||
(mock_assert(0, #expression, __FILE__, __LINE__), abort()) : (void)0)
|
(mock_assert(0, #expression, __FILE__, __LINE__), abort()) : (void)0)
|
||||||
#define _assert_true(c, e, f, l) \
|
#define _assert_true(c, e, f, l) \
|
||||||
((c) ? (void)0 : (_assert_true(0, e, f, l), abort()))
|
((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 */
|
#else /* UNIT_TESTING */
|
||||||
/*
|
/*
|
||||||
* Assertions
|
* Assertions
|
||||||
|
@@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
#if HAVE_CMOCKA
|
#if HAVE_CMOCKA
|
||||||
|
|
||||||
|
#include <setjmp.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <setjmp.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
#if HAVE_CMOCKA
|
#if HAVE_CMOCKA
|
||||||
|
|
||||||
|
#include <setjmp.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <setjmp.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
|
Reference in New Issue
Block a user