arduino / arduino/ArduinoCore-avr
Eliminate compiler warnings for unused parameter.
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
```
/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 {
```
With `-Werror` it won't compile at all.
### Additional context
#### Additional reports
- https://github.com/arduino/ArduinoCore-avr/issues/610
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with cores/arduino/new.cpp, focusing on the four operator new/delete declarations and the unused tag parameters shown in the warning. Build the AVR core with -Werror and confirm those unused-parameter warnings no longer prevent compilation; no specific test is mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100