correct minor issues identified by scan-build