correct minor issues detected by scan-build

All very small stuff