[CMakeLists.txt] Set higher warning level, cleaned code
Fixed all -ansi warnings