Fix some warnings.

The 'offset' variable needs to stay because the disabled code below uses it.
Merge pull request #458 from Tilka/warnings

Fix some warnings