Enable warnings_as_errors

Treat compiler warnings as errors and fix current warnings.