Fix compilation warnings
Add gcc diagnostics option to supress some warnings