remove warnings about unused variables
remove warnings about signed/unsigned comparison
Merge pull request #3032 from AndrewMeadows/say-no-to-warnings

remove build warnings