Initialise variables
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 12 Mar 2018 10:03:54 +0000 (10:03 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 13 Mar 2018 16:00:55 +0000 (16:00 +0000)
The dx and dy variables may be left uninitialized by the coordinate
translation — or so the C compiler thinks. Let's avoid a warning when
building.

gtk/gtkwidget.c

index 72766c2c3c14b886a6da549231193f044ea6d3de..c0b7544a14ff84033267a79ee3a84abd41664a66 100644 (file)
@@ -5814,7 +5814,7 @@ translate_event_coordinates (GdkEvent  *event,
 {
   GtkWidget *event_widget;
   double x, y;
-  double dx, dy;
+  double dx = 0.0, dy = 0.0;
 
   if (!gdk_event_get_coords (event, &x, &y))
     return;