add -Wall to the makfile and fix the warnings.