Add -Wall compiler switch and fix warnings.