Added warning related compilation flags and fixed related errors.

Hello, thanks for your great library !
I added some compilation flags and tested this with g++ under linux.
Several issues were encountered.
We want this structure to nulled