Silence "unused parameter" warnings in C++

This has been done already, but the fixes were accidentally
removed in 249f05e7d70761823ef07a990276f9200e8b3302.