fix all build warning
fix memory leak in previous
Merge pull request #8 from remicollet/issue-021

fix all build warnings