LPS-47531 Fix generic casting warning