Fix bugs and fix compile warnings.

1. Have gotten an example of ETB raw data. Test etb_format.c and fix bugs.
2. Fix compile warnings.