fix missing break;-s
Add -Wextra and -Werror CFLAGS and also fix compile errors