Fixing issues found by Coverity
Fixing issues found by clang's -Weverything
Fixing macro vararg warnings.  Should be more standards-compliant now.
Code cleanups for clang's -Weverything