Bug #82230 Fix -Wunused-parameter warnings
Submitted: 14 Jul 2016 13:31 Modified: 25 Apr 2017 14:43
Reporter: Jon Olav Hauglid Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.0 OS:Any
Assigned to: CPU Architecture:Any

[14 Jul 2016 13:31] Jon Olav Hauglid
Description:
-Wunused-parameter is the only default GCC warning that we currently disable everywhere.
We should stop disabling this warning and instead fix the code.

The plan is to do this incrementally, piece by piece.

How to repeat:
Use -Wunused-parameter when building with GCC.

Suggested fix:
Three different ways warnings can be fixed:
- Remove the unused parameter
- Remove the parameter name, only keep the type (e.g. virtual functions)
- Use MY_ATTRIBUTE((unused)) (e.g. virtual functions with doxygen)

Which way warnings should be fixed, must be evaluated in a case-by-case basis.
[25 Apr 2017 14:43] Paul Dubois
Posted by developer:
 
Fixed in 8.0.2.

Code cleanup. No changelog entry needed.