Fix compiler warnings regarding loss of data (GH-23983)

2 files changed