mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
teach cppcheck that _assert_int_equal and _assert_int_not_equal don't return on failure
This commit is contained in:
parent
ce52ac1178
commit
5d5d751c7f
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user