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.
See comment above - why explicitly zero the structure when we can get the compiler to do it for us?