HPCC-11846 Fix various clang warnings

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Is this a cleaver way of swapping without using a temp? Should we recode to use a temp to be clearer?