Fix warnings by explicitly casting enum types