]> granicus.if.org Git - nethack/commitdiff
I recognize that this was an attempt to force the macro to act as a normal
authorjwalz <jwalz>
Sun, 31 Mar 2002 22:42:07 +0000 (22:42 +0000)
committerjwalz <jwalz>
Sun, 31 Mar 2002 22:42:07 +0000 (22:42 +0000)
statement that could be followed by ';' anywhere.  However, with the goto
there, my compiler complains every time it's used:
"ball.c", line 402: warning: statement not reached
"ball.c", line 434: warning: statement not reached
"ball.c", line 442: warning: statement not reached
"ball.c", line 449: warning: statement not reached
"ball.c", line 452: warning: statement not reached
"ball.c", line 457: warning: statement not reached
"ball.c", line 479: warning: statement not reached
"ball.c", line 498: warning: statement not reached
None of the current uses care about an excess statement, but is there a
way to satisfy both desires?

src/ball.c

index 364b3f832ec35cfbeb8b9c05885e823261a10545..4c0250f17c421d591a4c1756df7f9d721619e864 100644 (file)
@@ -390,9 +390,9 @@ boolean *cause_delay;
 /* Don't ever move the chain into solid rock.  If we have to, then instead
  * undo the move_bc() and jump to the drag ball code.
  */
-#define SKIP_TO_DRAG do { *chainx = oldchainx; *chainy = oldchainy; \
+#define SKIP_TO_DRAG { *chainx = oldchainx; *chainy = oldchainy; \
     move_bc(0, *bc_control, *ballx, *bally, *chainx, *chainy); \
-    goto drag; } while(0)
+    goto drag; } 
            switch(dist2(x, y, uball->ox, uball->oy)) {
                /* two spaces diagonal from ball, move chain inbetween */
                case 8: