Fix warning on gcc 4.9.1

Complains about the function not being used anywhere.
Merge pull request #6698 from ktf/fix-warning

Fix warning on gcc 4.9.1