From 5b43a08b64d2038e384bdcc229dfac3b826ae32a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 27 Aug 2023 18:03:07 +0200 Subject: [PATCH] Linux: remove a couple of cpmpiler warnings --- massif/tests/Makefile.am | 2 +- memcheck/tests/realloc_size_zero.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index cc79beceb4..f8deeb5766 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -91,7 +91,7 @@ AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) bug469146_SOURCES = bug469146.cpp # -fno-optimize-sibling-calls because otherwise some platforms will have # tail call optimization which messes up --ignore-fn -bug469146_CXXFLAGS = $(AM_CXXFLAGS) -O2 -fno-optimize-sibling-calls +bug469146_CXXFLAGS = $(AM_CXXFLAGS) -O2 -fno-optimize-sibling-calls @FLAG_W_NO_USE_AFTER_FREE@ new_cpp_SOURCES = new-cpp.cpp overloaded_new_SOURCES = overloaded-new.cpp # pre C++11 compilers don't have exception specs diff --git a/memcheck/tests/realloc_size_zero.c b/memcheck/tests/realloc_size_zero.c index c9d8e74777..3e25d85a61 100644 --- a/memcheck/tests/realloc_size_zero.c +++ b/memcheck/tests/realloc_size_zero.c @@ -22,7 +22,7 @@ int main(void) } errno = 0; - volatile void *ptr = NULL; + void *ptr = NULL; volatile size_t size = 0U; char *p2 = realloc(ptr, size); if (p2) { -- 2.47.2