Silence "unused parameter" warnings in C++

This has been done already, but the fixes were accidentally
removed in 249f05e7d70761823ef07a990276f9200e8b3302.
Merge pull request #2489 from Ancurio/silence_cpp_warn

Silence "unused parameter" warnings in C++