Fix some issues from SCA with cppcheck