| 1 |
Description: Fix borg compiler warnings |
| 2 |
Author: Chris Carr <[email protected]> |
| 3 |
Forwarded: not yet |
| 4 |
Last-Update: 2023-08-30 |
| 5 |
--- |
| 6 |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
| 7 |
--- a/src/borg/borg4.c |
| 8 |
+++ b/src/borg/borg4.c |
| 9 |
@@ -2945,14 +2945,11 @@ |
| 10 |
armour_swap_slay_giant = item->slays[RF_GIANT]; |
| 11 |
armour_swap_slay_dragon = item->slays[RF_DRAGON]; |
| 12 |
if (of_has(item->flags, OF_IMPACT)) armour_swap_impact = true; |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
+ if (item->brands[ELEM_ACID]) armour_swap_brand_acid = true; |
| 22 |
+ if (item->brands[ELEM_ELEC]) armour_swap_brand_elec = true; |
| 23 |
+ if (item->brands[ELEM_FIRE]) armour_swap_brand_fire = true; |
| 24 |
+ if (item->brands[ELEM_COLD]) armour_swap_brand_cold = true; |
| 25 |
+ if (item->brands[ELEM_POIS]) armour_swap_brand_pois = true; |
| 26 |
|
| 27 |
/* Affect infravision */ |
| 28 |
armour_swap_see_infra += item->modifiers[OBJ_MOD_INFRA]; |
| 29 |
--- a/src/borg/borg6.c |
| 30 |
+++ b/src/borg/borg6.c |
| 31 |
@@ -5352,7 +5352,7 @@ |
| 32 |
if (obj) |
| 33 |
{ |
| 34 |
/* Slay is on an object */ |
| 35 |
|
| 36 |
+ if (!obj->slays[i]) continue; |
| 37 |
} |
| 38 |
else { |
| 39 |
/* Temporary slay */ |