HPCC-11280 Fix clang compile error (and invalid code)

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
HPCC-11280 Fix other clang warnings

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #5752 from ghalliday/issue11280

HPCC-11280 Fix clang compile error (and invalid code)

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>