mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
ports/unix/check: Ignore error from fail_* macros
Usage of fail_if/fail_unless macros with a message results in a warning with the latest version of check (0.15.2+) and GCC. Ignore this specific error (since warnings are treated as errors) for now. Example failure: In file included from ../../../../src/../test/unit/lwip_check.h:7, from ../../../../src/../test/unit/lwip_unittests.c:1: ../../../../src/../test/unit/lwip_unittests.c: In function ‘lwip_check_ensure_no_alloc’: ../../../../src/../test/unit/lwip_unittests.c:55:7: error: too many arguments for format [-Werror=format-extra-args] 55 | "mem heap still has %d bytes allocated", lwip_stats.mem.used); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
7b77378ed8
commit
ecab77654a
@ -37,6 +37,11 @@ LWIPDIR=../../../../src
|
||||
# The include path to sys_arch.h and lwipopts.h must be first, so this must be before Common.mk
|
||||
CFLAGS=-DLWIP_NOASSERT_ON_ERROR -I/usr/include/check -I$(LWIPDIR)/../test/unit
|
||||
|
||||
# Ignore 'too many arguments for format' warnings which happen with GCCs
|
||||
# from check 0.15.2 on fail_if/fail_unless macros with text.
|
||||
# See https://github.com/libcheck/check/pull/298/commits/82540c5428d3818b64d
|
||||
CFLAGS+=-Wno-error=format-extra-args
|
||||
|
||||
ifeq (clang,$(findstring clang,$(CC)))
|
||||
# check.h causes 'error: token pasting of ',' and __VA_ARGS__ is a GNU extension' with clang 9.0.0
|
||||
CFLAGS+=-Wno-gnu-zero-variadic-macro-arguments
|
||||
|
Loading…
Reference in New Issue
Block a user