Description: Fix borg compiler warnings Author: Chris Carr Forwarded: not yet Last-Update: 2023-08-30 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/borg/borg4.c +++ b/src/borg/borg4.c @@ -2945,14 +2945,11 @@ armour_swap_slay_giant = item->slays[RF_GIANT]; armour_swap_slay_dragon = item->slays[RF_DRAGON]; if (of_has(item->flags, OF_IMPACT)) armour_swap_impact = true; - if (item->brands) - { - if (item->brands[ELEM_ACID]) armour_swap_brand_acid = true; - if (item->brands[ELEM_ELEC]) armour_swap_brand_elec = true; - if (item->brands[ELEM_FIRE]) armour_swap_brand_fire = true; - if (item->brands[ELEM_COLD]) armour_swap_brand_cold = true; - if (item->brands[ELEM_POIS]) armour_swap_brand_pois = true; - } + if (item->brands[ELEM_ACID]) armour_swap_brand_acid = true; + if (item->brands[ELEM_ELEC]) armour_swap_brand_elec = true; + if (item->brands[ELEM_FIRE]) armour_swap_brand_fire = true; + if (item->brands[ELEM_COLD]) armour_swap_brand_cold = true; + if (item->brands[ELEM_POIS]) armour_swap_brand_pois = true; /* Affect infravision */ armour_swap_see_infra += item->modifiers[OBJ_MOD_INFRA]; --- a/src/borg/borg6.c +++ b/src/borg/borg6.c @@ -5352,7 +5352,7 @@ if (obj) { /* Slay is on an object */ - if (!obj->slays || !obj->slays[i]) continue; + if (!obj->slays[i]) continue; } else { /* Temporary slay */