Set more strict compiler flags and fix errors detected.