Fix compilation warnings:
- set but unused variables
- type punned casts
Fix compilation warnings: set but unused variables.
Merge pull request #344 from glebius/master

Fix several compilation warnings