HPCC-12513 Clean up various windows warnings

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
In theory [only] this could exceed 2^32. So if being pedantic, it should probably be replaced by a if < > = statement.