New warnings from latest clang version

Removed completely unused variables. Ifdef’ed out variable which is
referenced from commented out code.
Turn off warnings as errors as default

Also changed WarningsAsErrorsOff to WarningsAsErrorsOn to be used by
TeamCity builds.
Merge pull request #588 from DonLakeFlyer/WarningsOffDefault

Warnings as Errors off by  default