QPID-4984: Fix compiler warnings caused by questionable programming practices

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1535277 13f79535-47bb-0310-9956-ffa450edef68