Skip to content

Eliminate compiler warnings for unused parameter. #508

Open
@habazut

Description

@habazut
/home/haba/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/new.cpp: In function 'void* operator new(std::size_t, std::nothrow_t)':
/home/haba/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/new.cpp:59:60: warning: unused parameter 'tag' [-Wunused-parameter]
 void * operator new(std::size_t size, const std::nothrow_t tag) noexcept {
                                                            ^~~
/home/haba/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/new.cpp: In function 'void* operator new [](std::size_t, const std::nothrow_t&)':
/home/haba/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/new.cpp:68:63: warning: unused parameter 'tag' [-Wunused-parameter]
 void * operator new[](std::size_t size, const std::nothrow_t& tag) noexcept {
                                                               ^~~
/home/haba/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/new.cpp: In function 'void operator delete(void*, const std::nothrow_t&)':
/home/haba/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/new.cpp:103:55: warning: unused parameter 'tag' [-Wunused-parameter]
 void operator delete(void* ptr, const std::nothrow_t& tag) noexcept {
                                                       ^~~
/home/haba/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/new.cpp: In function 'void operator delete [](void*, const std::nothrow_t&)':
/home/haba/.arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/new.cpp:106:57: warning: unused parameter 'tag' [-Wunused-parameter]
 void operator delete[](void* ptr, const std::nothrow_t& tag) noexcept {

Just fix. with a void (tag); With -Werror it won't compile at all.
Regards,
Harald.

Activity

linked a pull request that will close this issueRemoved compiler warnings (unused variable). #484on Oct 26, 2022
linked a pull request that will close this issuePrevent 'unused parameter' Warnings #476on Oct 26, 2022
matthijskooijman

matthijskooijman commented on Oct 26, 2022

@matthijskooijman
Collaborator

There are already a number of PRs for this, I would prefer merging #487 to fix this.

linked a pull request that will close this issue on Jun 9, 2024
noisymime

noisymime commented on Aug 11, 2024

@noisymime

Is there any hope of getting one of the multiple PRs that resolve this annoyance pulled in?

The PRs are very low impact/risk, it really would be nice to have this cleaned up.

locked as too heated and limited conversation to collaborators on Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Eliminate compiler warnings for unused parameter. · Issue #508 · arduino/ArduinoCore-avr