Fix gcc warning.
Fix cflags setting and temp disable werror.