FLEX-33902 reduce memory allocations
Remove compiler warning