fixed compiler warning by adding missing variable initialization (finally)
[rocksndiamonds.git] / src / screens.c
index ba5a211911500f064607ea445b1b0a2f236e0dc8..a5bc5ac1b7009f31f46d5831681f9705d7eb8d2e 100644 (file)
@@ -6522,7 +6522,6 @@ static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
   static boolean bitmaps_initialized = FALSE;
   boolean screen_initialized = FALSE;
   static Bitmap *controller, *button, *axis_x, *axis_y;
-  Bitmap *marker;
   char *name;
   boolean success = TRUE;
   boolean done = FALSE, next = FALSE;
@@ -6602,6 +6601,8 @@ static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
   /* loop through all steps (buttons and axes), getting joystick events */
   for (i = 0; i < SDL_arraysize(steps) && !done;)
   {
+    Bitmap *marker = button;   /* initialize with reliable default value */
+
     step = &steps[i];
     strcpy(step->mapping, mapping);
     step->axis = -1;