Updates CFLAGS and fix some warnings