From 20b0b30b20cf1b84a8f6eacac75c38740ff9f768 Mon Sep 17 00:00:00 2001 From: Guilherme Gonzaga <guilhermgonzaga@gmail.com> Date: Mon, 14 Feb 2022 20:18:50 -0400 Subject: [PATCH] Mark unused parameters with [[gnu::unused]] --- cores/arduino/new.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cores/arduino/new.cpp b/cores/arduino/new.cpp index 7ca493169..2c05cd31f 100644 --- a/cores/arduino/new.cpp +++ b/cores/arduino/new.cpp @@ -56,7 +56,7 @@ void * operator new[](std::size_t size) { return operator new(size); } -void * operator new(std::size_t size, const std::nothrow_t tag) noexcept { +void * operator new(std::size_t size, [[gnu::unused]] const std::nothrow_t tag) noexcept { #if defined(NEW_TERMINATES_ON_FAILURE) // Cannot call throwing operator new as standard suggests, so call // new_helper directly then @@ -65,7 +65,7 @@ void * operator new(std::size_t size, const std::nothrow_t tag) noexcept { return operator new(size); #endif } -void * operator new[](std::size_t size, const std::nothrow_t& tag) noexcept { +void * operator new[](std::size_t size, [[gnu::unused]] const std::nothrow_t& tag) noexcept { #if defined(NEW_TERMINATES_ON_FAILURE) // Cannot call throwing operator new[] as standard suggests, so call // malloc directly then @@ -100,10 +100,10 @@ void operator delete[](void * ptr, std::size_t size) noexcept { } #endif // __cplusplus >= 201402L -void operator delete(void* ptr, const std::nothrow_t& tag) noexcept { +void operator delete(void* ptr, [[gnu::unused]] const std::nothrow_t& tag) noexcept { operator delete(ptr); } -void operator delete[](void* ptr, const std::nothrow_t& tag) noexcept { +void operator delete[](void* ptr, [[gnu::unused]] const std::nothrow_t& tag) noexcept { operator delete[](ptr); }