Fixed a couple Clang warnings

Fixed some recently introduced "regressions" that trigger Clang warnings while building on OS X (`checkout.c` one is a real bug too).
Right.  This can't happen in practice, though clang's static code analysis doesn't know that.  Aborting in the else block will shut it up.  `assert(ancestor || ours || theirs)` probably will, too.  But trying to return an error here is not preferred.