From 87db946618bbf20efac2ecf5ba6f223e0cee8d8d Mon Sep 17 00:00:00 2001 From: Bradley Smith Date: Wed, 18 Nov 2009 18:26:22 +0000 Subject: Fix issues when compiling with optimisations. Signed-off-by: Bradley Smith --- src/grobot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/grobot.c') 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); -- cgit v1.1