build: fix or suppress warnings

- activated "treat warnings as errors"
Could you please do it as a separate commit with a proper explanation of what this patch does?