Fix compilation warnings
Cherry-picked from !403 (merged)
820cd07a Fix gcc7 deprecation warning exposed by gaudi/Gaudi 408
743f3a62 Work around _POSIX_C_SOURCE and _XOPEN_SOURCE redefined warnings
4a6db59c Suppress compilation warnigns from Python
Edited by Marco Cattaneo