[cppcheck] fix some nits