gcc-warning: check c function return. Print error when bad.

v2: properly check return code of fread/getcwd function
zzogl: gcc warning fix

Let's hope variadic macro work on visual

cmake: reenable various warning. With previous fixes it just a matter of a couple of warnings