Fixed problems reported by scan-build (of CLang fame).