correct small issues identified by scan-build