Fix several more warnings & errors caught by clang (via Travis).