From: Paul Floyd Date: Wed, 17 Sep 2025 10:52:07 +0000 (+0200) Subject: Linux clang: fix 2 build warnings and 1 error in tests X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a38f5d9bb9a8ac77d869f9053ae62ab44813ff7;p=thirdparty%2Fvalgrind.git Linux clang: fix 2 build warnings and 1 error in tests clang++ not supporting sized deallocation by default is a bit annoying. --- diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index 7fa1611a9..bf5daf247 100755 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -578,7 +578,8 @@ endif tsan_unittest_SOURCES = tsan_unittest.cpp tsan_unittest_CXXFLAGS = $(AM_CXXFLAGS) \ - -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"' + -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"' \ + @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \ -DENABLE_DRD_CONSISTENCY_CHECKS \ diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 6e3105a59..c1779a7bb 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -727,6 +727,7 @@ sized_aligned_new_delete_misaligned3_SOURCES = sized_aligned_new_delete_misalign sized_aligned_new_delete_misaligned3_CXXFLAGS = ${AM_CXXFLAGS} -std=c++17 @FLAG_W_NO_UNUSED_VARIABLE@ if COMPILER_IS_CLANG cxx17_aligned_new_CXXFLAGS += -fsized-deallocation +duplicate_align_size_errors_CXXFLAGS += -fsized-deallocation sized_aligned_new_delete_args_CXXFLAGS += -fsized-deallocation sized_aligned_new_delete_misaligned1_CXXFLAGS += -fsized-deallocation sized_aligned_new_delete_misaligned2_CXXFLAGS += -fsized-deallocation diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index 13d6a05af..e28866fc1 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -143,6 +143,8 @@ dlclose_leak_LDFLAGS = $(AM_FLAG_M3264_PRI) \ -Wl,-rpath,$(top_builddir)/memcheck/tests/linux enomem_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_USE_AFTER_FREE@ +memalign_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_NON_POWER_OF_TWO_ALIGNMENT@ + if HAVE_STRLCAT strlcat_strlcpy_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_STRINGOP_OVERFLOW@ endif