HPCC-11119 Fix some warnings in the generated code

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

HPCC-11119 Fix some warnings in the generated code

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>