fix complaints from clang scan-build

found with clang versions > 3.2