Some changes from building with clang's c++-analyzer