set warnings as error for gcc and clang

Now that all warnings are fixed I'd suggest to enable "warnings as errors" (-Werror) to prevent new ones.