Fix a few more problems found with scan-build and clang 3.4 on OS X.