WebSerial icon indicating copy to clipboard operation
WebSerial copied to clipboard

WebSerial.cpp: fixing warnings: `[-Wunused-parameter]`

Open MacDada opened this issue 1 year ago • 0 comments

They appear when the code is compiled with a flag Wextra.

I know of 3 possible solutions:

  • A.) static_cast<void>(unusedParameter); – the one I chose
  • B.) (void) unusedParameter; – "old" C–style casting, but A is more precise in C++
  • C.) remove unusedParameter var from the function arguments – but keeping the name better explains what it is

MacDada avatar Apr 30 '23 15:04 MacDada