Removed some warning settings that weren't supported by older GCCs. Also added workarounds for some spurious GCC warnings.