Cleaner setting of CXX_FLAGS.

[ADD] CXX_FLAGS: added compile warnings
[FIX] fixed all compile warnings