CID 1311767: Cast enum type to avoid compiler warnings