correct minor issues found by scan-build