Fix some Clang static analysis warnings about unused variables.