Added -Werror and -Wall compiler options and fixed the errors they reported.