remove warnings from clang patch

The patch created some warnings, which are all fixed in this PR.