Clearer use of compiler flags for unix
Fix a few compiler warnings