Fix a few scan-build warnings