[TIMOB-16697] (3_4_X) Fix Implicit conversion warning

Cherry Pick PR #6328 into 3_4_X
If you turn on the Xcode flag to warn about implicit 32 bit conversion, these files will show warnings.