Added warn compile options. Fixed compile warnings.

related to #440