Skip to content

Commit 0a14a50

Browse files
committed
Update new.cpp
Suppress 4 annoying warnings in new.cpp.
1 parent 321fca0 commit 0a14a50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: cores/arduino/new.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ void * operator new[](std::size_t size) {
5757
}
5858

5959
void * operator new(std::size_t size, const std::nothrow_t tag) noexcept {
60+
(void)tag; // unused
6061
#if defined(NEW_TERMINATES_ON_FAILURE)
6162
// Cannot call throwing operator new as standard suggests, so call
6263
// new_helper directly then
@@ -66,6 +67,7 @@ void * operator new(std::size_t size, const std::nothrow_t tag) noexcept {
6667
#endif
6768
}
6869
void * operator new[](std::size_t size, const std::nothrow_t& tag) noexcept {
70+
(void)tag; // unused
6971
#if defined(NEW_TERMINATES_ON_FAILURE)
7072
// Cannot call throwing operator new[] as standard suggests, so call
7173
// malloc directly then
@@ -101,9 +103,11 @@ void operator delete[](void * ptr, std::size_t size) noexcept {
101103
#endif // __cplusplus >= 201402L
102104

103105
void operator delete(void* ptr, const std::nothrow_t& tag) noexcept {
106+
(void)tag; // unused
104107
operator delete(ptr);
105108
}
106109
void operator delete[](void* ptr, const std::nothrow_t& tag) noexcept {
110+
(void)tag; // unused
107111
operator delete[](ptr);
108112
}
109113

0 commit comments

Comments
 (0)