diff options
author | Bradley Smith | 2009-11-18 18:26:22 +0000 |
---|---|---|
committer | Bradley Smith | 2009-11-18 18:26:22 +0000 |
commit | 87db946618bbf20efac2ecf5ba6f223e0cee8d8d (patch) | |
tree | c2ee4e3562305c790fba0c9ec2937d8646c9fe56 /src/grobot.c | |
parent | Change email address for Jim Hall, upon request. (diff) | |
download | gnurobots-87db946618bbf20efac2ecf5ba6f223e0cee8d8d.tar.gz |
Fix issues when compiling with optimisations.
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
Diffstat (limited to 'src/grobot.c')
-rw-r--r-- | src/grobot.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/grobot.c b/src/grobot.c index 6971bb8..e9dadc2 100644 --- a/src/grobot.c +++ b/src/grobot.c @@ -365,7 +365,7 @@ void g_robot_turn(GRobot *robot, gint num_turns) gboolean g_robot_move(GRobot *robot, gint steps) { gint x_to, y_to; - gint dx, dy; + gint dx = 0, dy = 0; gint i; g_return_val_if_fail(robot->ui != NULL && robot->map != NULL, FALSE); @@ -509,7 +509,7 @@ gboolean g_robot_feel(GRobot *robot, gchar *str) { gint th; gint x_to, y_to; - gint dx, dy; + gint dx = 0, dy = 0; g_return_val_if_fail(robot->ui != NULL && robot->map != NULL, FALSE); @@ -573,7 +573,7 @@ gboolean g_robot_look(GRobot *robot, gchar *str) { gint th; gint x_to, y_to; - gint dx, dy; + gint dx = 0, dy = 0; g_return_val_if_fail(robot->ui != NULL && robot->map != NULL, FALSE); @@ -635,7 +635,7 @@ gboolean g_robot_look(GRobot *robot, gchar *str) gboolean g_robot_grab(GRobot *robot) { gint x_to, y_to; - gint dx, dy; + gint dx = 0, dy = 0; g_return_val_if_fail(robot->ui != NULL && robot->map != NULL, FALSE); @@ -717,7 +717,7 @@ gboolean g_robot_grab(GRobot *robot) gboolean g_robot_zap(GRobot *robot) { gint x_to, y_to; - gint dx, dy; + gint dx = 0, dy = 0; g_return_val_if_fail(robot->ui != NULL && robot->map != NULL, FALSE); |