fix scan-build 272 warnings