]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Linux clang: fix 2 build warnings and 1 error in tests
authorPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 17 Sep 2025 10:52:07 +0000 (12:52 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 17 Sep 2025 10:52:07 +0000 (12:52 +0200)
clang++ not supporting sized deallocation by default is a bit
annoying.

drd/tests/Makefile.am
memcheck/tests/Makefile.am
memcheck/tests/linux/Makefile.am

index 7fa1611a97b7dddb7006f19553ea23dfa32769df..bf5daf247fd4d6102c5705d82a6739580601e7ca 100755 (executable)
@@ -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 \
index 6e3105a594570d2cfcefe7996bd3e74915cda65b..c1779a7bb35415d7f46121002c1084c2c6b536b2 100644 (file)
@@ -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
index 13d6a05af0afed5e5adec285cdb5526b3fd7b1f7..e28866fc18d82a9badb1b4f05f55103efd352624 100644 (file)
@@ -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