Enable -Wall and -Wextra and fix most local warnings