Warnings

This adds an Xcode project file (for those who develop on OS X) and fixes several - potential or real - issues we detected thanks to its more strict warnings settings. It also updates the unix build script with similar warning settings.