Add -Wextra and -Werror CFLAGS and also fix compile errors