[Freeciv-Dev] (PR#10189) [Patch] Fix warning from gamehand.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#10189) [Patch] Fix warning from gamehand.c |
From: |
"Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx> |
Date: |
Sun, 19 Sep 2004 04:53:41 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10189 >
gcc warned that 'role' might be used uninitialized in
place_starting_unit(). This patch should provide sane (or as sane as
possible) behavior for -DNDEBUG compilations too.
- Caz
diff -Nurd -X.diff_ignore freeciv/server/gamehand.c freeciv/server/gamehand.c
--- freeciv/server/gamehand.c 2004-09-18 13:29:26.609375000 +0300
+++ freeciv/server/gamehand.c 2004-09-19 14:50:46.921875000 +0300
@@ -97,7 +97,9 @@
case 'D': role = L_DEFEND_GOOD; break;
case 'a': role = L_ATTACK_FAST; break;
case 'A': role = L_ATTACK_STRONG; break;
- default: assert(FALSE);
+ default:
+ assert(FALSE);
+ return;
}
/* Create the unit of an appropriate type, if it exists */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#10189) [Patch] Fix warning from gamehand.c,
Marko Lindqvist <=
|
|