Commits

illume committed d38f864

Changes to appease gcc4 may be use uninitialized warnings.

Comments (0)

Files changed (2)

     pete@shinners.org
 */
 
+
 /*
  *  font module for pygame
  */
 	{
 		if(!RGBAFromObj(bg_rgba_obj, rgba))
 			return RAISE(PyExc_TypeError, "Invalid background RGBA argument");
-		backg.r = rgba[0]; backg.g = rgba[1]; backg.b = rgba[2];
-	}
+		backg.r = rgba[0];
+                backg.g = rgba[1];
+                backg.b = rgba[2];
+                backg.unused = 0;
+	} else {
+		backg.r = 0;
+                backg.g = 0;
+                backg.b = 0;
+                backg.unused = 0;
+        }
 
 
 	if(!PyObject_IsTrue(text))
 			c01 = *sp;
 			c10 = *sp;
 			c11 = *sp;
-		    }
+		    } else {
+                        // NOTE: a catchall to appease gcc4 warnings...
+                        // Probably should not get here.  we'll see.
+                        //  old behaviour would be to use the previous pixel, from the previous loop.
+			sp = (tColorRGBA *) (src->pixels);
+			c00 = *sp;
+			c01 = *sp;
+			c10 = *sp;
+			c11 = *sp;
+                    }
 		    /*
 		     * Interpolate colors 
 		     */