cppcheck: fix more warnings