Fix warnings about sizes and signs, and local variables masking global ones
Flag unused parameter as such
Merge pull request #11 from hughescr/feature/fix-warnings

Fix warnings when stricter options enabled