enable -Wall and fix warnings