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).