Fix warnings about unused parameters
(cherry picked from commit 63b518b23068730756337ca99f70ac78ed87d00f)