clang-analyzer fixups

Both of these changes are just to help clang-analyzer not
warn in cases where nothing bad is actually happening...