r5807: fix segfault after compiler warning clean up (and cleanup another warning)