Fix compiler warnings

This pull request fixes a number of compiler warnings (as reported by `clang`).