Fix gcc compiler warnings
  - unused function
  - signed/unsigned comparisons
  - unused variables
Merge pull request #120 from asmaloney/fix_compiler_warnings

Fix gcc compiler warnings