CIfo: fix a couple of warnings

It's safe to use explicit casts, all necessary checks are in the 'if' already