From 5af8b46f79a318b673a3aa1fa96b55b5440d9bea Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 23 Nov 2023 12:23:09 -0500 Subject: [PATCH] follow-up to pmidx, quiet a set of unexpected warnings in makemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An interesting side effect of the monsndx change that wasn't expected was a series of warnings on a switch statement in makemon.c. The compiler is now able to evaluate the switch coverage at compile time. While the number of warnings was daunting, the fix was simple. makemon.c: In function ‘is_home_elemental’: makemon.c:34:9: warning: enumeration value ‘PM_GIANT_ANT’ not handled in switch [-Wswitch] 34 | switch (monsndx(ptr)) { | ^~~~~~ makemon.c:34:9: warning: enumeration value ‘PM_KILLER_BEE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SOLDIER_ANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FIRE_ANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT_BEETLE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_QUEEN_BEE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ACID_BLOB’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_QUIVERING_BLOB’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GELATINOUS_CUBE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CHICKATRICE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_COCKATRICE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PYROLISK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_JACKAL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FOX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_COYOTE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WEREJACKAL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LITTLE_DOG’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DINGO’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DOG’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LARGE_DOG’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WOLF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WEREWOLF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WINTER_WOLF_CUB’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WARG’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WINTER_WOLF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HELL_HOUND_PUP’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HELL_HOUND’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GAS_SPORE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FLOATING_EYE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FREEZING_SPHERE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FLAMING_SPHERE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SHOCKING_SPHERE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KITTEN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HOUSECAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_JAGUAR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LYNX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PANTHER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LARGE_CAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_TIGER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DISPLACER_BEAST’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GREMLIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GARGOYLE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WINGED_GARGOYLE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HOBBIT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DWARF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BUGBEAR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DWARF_LEADER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DWARF_RULER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MIND_FLAYER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MASTER_MIND_FLAYER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MANES’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HOMUNCULUS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_IMP’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LEMURE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_QUASIT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_TENGU’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BLUE_JELLY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SPOTTED_JELLY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_OCHRE_JELLY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LARGE_KOBOLD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD_LEADER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD_SHAMAN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LEPRECHAUN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SMALL_MIMIC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LARGE_MIMIC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT_MIMIC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WOOD_NYMPH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WATER_NYMPH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MOUNTAIN_NYMPH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GOBLIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HOBGOBLIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HILL_ORC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MORDOR_ORC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_URUK_HAI’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORC_SHAMAN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORC_CAPTAIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ROCK_PIERCER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_IRON_PIERCER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GLASS_PIERCER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ROTHE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MUMAK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LEOCROTTA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WUMPUS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_TITANOTHERE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BALUCHITHERIUM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MASTODON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SEWER_RAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT_RAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_RABID_RAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WERERAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ROCK_MOLE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WOODCHUCK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CAVE_SPIDER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CENTIPEDE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT_SPIDER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SCORPION’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LURKER_ABOVE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_TRAPPER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PONY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WHITE_UNICORN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GRAY_UNICORN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BLACK_UNICORN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HORSE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WARHORSE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FOG_CLOUD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DUST_VORTEX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ICE_VORTEX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ENERGY_VORTEX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_STEAM_VORTEX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FIRE_VORTEX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_LONG_WORM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_PURPLE_WORM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LONG_WORM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PURPLE_WORM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GRID_BUG’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_XAN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_YELLOW_LIGHT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BLACK_LIGHT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ZRUTY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_COUATL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ALEAX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ANGEL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KI_RIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ARCHON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT_BAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_RAVEN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_VAMPIRE_BAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PLAINS_CENTAUR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FOREST_CENTAUR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MOUNTAIN_CENTAUR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_GRAY_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_GOLD_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_SILVER_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_RED_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_WHITE_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_ORANGE_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_BLACK_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_BLUE_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_GREEN_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_YELLOW_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GRAY_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GOLD_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SILVER_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_RED_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WHITE_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORANGE_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BLACK_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BLUE_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GREEN_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_YELLOW_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_STALKER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LICHEN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BROWN_MOLD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_YELLOW_MOLD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GREEN_MOLD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_RED_MOLD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SHRIEKER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_VIOLET_FUNGUS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GNOME’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GNOME_LEADER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GNOMISH_WIZARD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GNOME_RULER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_STONE_GIANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HILL_GIANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FIRE_GIANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FROST_GIANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ETTIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_STORM_GIANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_TITAN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MINOTAUR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_JABBERWOCK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KEYSTONE_KOP’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KOP_SERGEANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KOP_LIEUTENANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KOP_KAPTAIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LICH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DEMILICH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MASTER_LICH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ARCH_LICH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD_MUMMY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GNOME_MUMMY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORC_MUMMY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DWARF_MUMMY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ELF_MUMMY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_MUMMY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ETTIN_MUMMY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT_MUMMY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_RED_NAGA_HATCHLING’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BLACK_NAGA_HATCHLING’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GOLDEN_NAGA_HATCHLING’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GUARDIAN_NAGA_HATCHLING’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_RED_NAGA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BLACK_NAGA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GOLDEN_NAGA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GUARDIAN_NAGA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_OGRE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_OGRE_LEADER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_OGRE_TYRANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GRAY_OOZE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BROWN_PUDDING’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GREEN_SLIME’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BLACK_PUDDING’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_QUANTUM_MECHANIC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GENETIC_ENGINEER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_RUST_MONSTER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DISENCHANTER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GARTER_SNAKE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SNAKE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WATER_MOCCASIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PYTHON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PIT_VIPER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_COBRA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_TROLL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ICE_TROLL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ROCK_TROLL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WATER_TROLL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_OLOG_HAI’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_UMBER_HULK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_VAMPIRE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_VAMPIRE_LEADER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_VLAD_THE_IMPALER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BARROW_WIGHT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WRAITH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NAZGUL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_XORN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MONKEY’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_APE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_OWLBEAR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_YETI’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CARNIVOROUS_APE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SASQUATCH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD_ZOMBIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GNOME_ZOMBIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORC_ZOMBIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DWARF_ZOMBIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ELF_ZOMBIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_ZOMBIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ETTIN_ZOMBIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GHOUL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT_ZOMBIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SKELETON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_STRAW_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PAPER_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ROPE_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GOLD_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LEATHER_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WOOD_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FLESH_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CLAY_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_STONE_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GLASS_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_IRON_GOLEM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HUMAN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_WERERAT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_WEREJACKAL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_WEREWOLF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ELF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WOODLAND_ELF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GREEN_ELF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GREY_ELF’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ELF_NOBLE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ELVEN_MONARCH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DOPPELGANGER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SHOPKEEPER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GUARD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PRISONER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORACLE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ALIGNED_CLERIC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HIGH_CLERIC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SOLDIER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SERGEANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NURSE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LIEUTENANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CAPTAIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WATCHMAN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WATCH_CAPTAIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MEDUSA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WIZARD_OF_YENDOR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CROESUS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GHOST’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SHADE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WATER_DEMON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_AMOROUS_DEMON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HORNED_DEVIL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ERINYS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BARBED_DEVIL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MARILITH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_VROCK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HEZROU’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BONE_DEVIL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ICE_DEVIL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NALFESHNEE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PIT_FIEND’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SANDESTIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BALROG’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_JUIBLEX’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_YEENOGHU’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORCUS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GERYON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DISPATER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BAALZEBUB’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ASMODEUS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DEMOGORGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DEATH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PESTILENCE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_FAMINE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MAIL_DAEMON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DJINNI’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_JELLYFISH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PIRANHA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SHARK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GIANT_EEL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ELECTRIC_EEL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KRAKEN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NEWT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GECKO’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_IGUANA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BABY_CROCODILE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LIZARD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CHAMELEON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CROCODILE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SALAMANDER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LONG_WORM_TAIL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ARCHEOLOGIST’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_BARBARIAN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CAVE_DWELLER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HEALER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KNIGHT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MONK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CLERIC’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_RANGER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ROGUE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SAMURAI’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_TOURIST’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_VALKYRIE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WIZARD’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LORD_CARNARVON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PELIAS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SHAMAN_KARNOV’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HIPPOCRATES’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_KING_ARTHUR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GRAND_MASTER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ARCH_PRIEST’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ORION’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MASTER_OF_THIEVES’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LORD_SATO’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_TWOFLOWER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NORN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NEFERET_THE_GREEN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MINION_OF_HUHETOTL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_THOTH_AMON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CHROMATIC_DRAGON’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CYCLOPS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_IXOTH’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MASTER_KAEN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NALZOK’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_SCORPIUS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_MASTER_ASSASSIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ASHIKAGA_TAKAUJI’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_LORD_SURTUR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_DARK_ONE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_STUDENT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_CHIEFTAIN’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NEANDERTHAL’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ATTENDANT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_PAGE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ABBOT’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ACOLYTE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_HUNTER’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_THUG’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_NINJA’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_ROSHI’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_GUIDE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_WARRIOR’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘PM_APPRENTICE’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘NUMMONS’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘NON_PM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘LOW_PM’ not handled in switch [-Wswitch] makemon.c:34:9: warning: enumeration value ‘SPECIAL_PM’ not handled in switch [-Wswitch] --- src/makemon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/makemon.c b/src/makemon.c index 046290810..95f5411b5 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -40,7 +40,9 @@ is_home_elemental(struct permonst *ptr) return Is_earthlevel(&u.uz); case PM_WATER_ELEMENTAL: return Is_waterlevel(&u.uz); - } + default: + break; + } return FALSE; }