Fix semantic issues flagged by clang

The following changes address semantic issues flagged by clang with built with Apple LLVM 5.0 against the 10.9 SDK (Xcode 5 on Mavericks).