From bc50ed6c3de76c11b2dde92d0f28dd45941fc327 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 20 Aug 2023 19:02:03 +0200 Subject: Fix clang build - s/CLFAGS/CFLAGS/ - provide paths to local includes - sprinkle more __pass_object_size__ - remove a problematic test --- tests/Makefile | 5 +++-- tests/test_malloc.c | 7 ------- tests/test_vsnprintf_dynamic.c | 1 + tests/test_vsnprintf_static.c | 1 + tests/test_vsprintf.c | 1 + 5 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 tests/test_malloc.c (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index c2bc378..8db2853 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -31,7 +31,6 @@ TARGETS= \ test_gethostname_static \ test_getlogin_r_dynamic \ test_getlogin_r_static \ - test_malloc \ test_memchr_dynamic_read \ test_memchr_static_read \ test_memcpy_dynamic_read \ @@ -103,7 +102,9 @@ gcc: clean all clang: CC=clang clang: GCOV=gcov clang: CFLAGS+=-I/usr/include/x86_64-linux-musl -clang: CLFAGS+=-nostdlib +clang: CFLAGS+=-I../x86_64-linux-musl-native/include/ +clang: CFLAGS+=-Ix86_64-linux-musl-native/include/ +clang: CFLAGS+=-nostdinc clang: clean all diff --git a/tests/test_malloc.c b/tests/test_malloc.c deleted file mode 100644 index 360ee82..0000000 --- a/tests/test_malloc.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "common.h" - -#include - -int main(int argc, char** argv) { - free(malloc(1)); -} diff --git a/tests/test_vsnprintf_dynamic.c b/tests/test_vsnprintf_dynamic.c index 5d99081..474ba26 100644 --- a/tests/test_vsnprintf_dynamic.c +++ b/tests/test_vsnprintf_dynamic.c @@ -10,6 +10,7 @@ int msg_valid(int n, const char * format, ... ) { va_start (args, format); vsnprintf(buffer, n, format, args); va_end (args); + return 0; } int msg(int n, const char * format, ... ) { diff --git a/tests/test_vsnprintf_static.c b/tests/test_vsnprintf_static.c index f1263a8..d6b7e9b 100644 --- a/tests/test_vsnprintf_static.c +++ b/tests/test_vsnprintf_static.c @@ -10,6 +10,7 @@ int msg_valid(int n, const char * format, ... ) { va_start (args, format); vsnprintf(buffer, n, format, args); va_end (args); + return 0; } int msg(int n, const char * format, ... ) { diff --git a/tests/test_vsprintf.c b/tests/test_vsprintf.c index 4e27201..bd5b893 100644 --- a/tests/test_vsprintf.c +++ b/tests/test_vsprintf.c @@ -10,6 +10,7 @@ int msg_valid(const char * format, ... ) { va_start (args, format); vsprintf(buffer, format, args); va_end (args); + return 0; } int msg(const char * format, ... ) { -- cgit v1.3