]> granicus.if.org Git - nethack/commitdiff
avoid a warning on x ? :
authornhmall <nhmall@nethack.org>
Thu, 12 Jan 2023 21:31:35 +0000 (16:31 -0500)
committernhmall <nhmall@nethack.org>
Thu, 12 Jan 2023 21:31:35 +0000 (16:31 -0500)
Surround the code to the left of the '?' in the DESTROY_ARM(o) macro
with () to quiet a warning on each use of the macro.

src/do_wear.c

index 37b6fcd790cb77390168575cf90ad1eb8011d9a0..5a9c4a237ceb5ff1054e29167b7e4f3ea7b34a45 100644 (file)
@@ -2945,10 +2945,10 @@ destroy_arm(register struct obj *atmp)
      * artifact suit over a shirt.  That would be a bug.  Since there
      * aren't any, we'll just look the other way.
      */
-#define DESTROY_ARM(o)                            \
-    ((otmp = (o)) != 0 && (!atmp || atmp == otmp) \
-             && (!obj_resists(otmp, 0, 90))       \
-         ? (otmp->in_use = TRUE)                  \
+#define DESTROY_ARM(o)                             \
+    (((otmp = (o)) != 0 && (!atmp || atmp == otmp) \
+             && (!obj_resists(otmp, 0, 90)))       \
+         ? (otmp->in_use = TRUE)                   \
          : FALSE)
 
     if (DESTROY_ARM(uarmc)) {