Fix FTBFS with GCC 6
authorMichael Catanzaro <mcatanzaro@igalia.com>
Fri, 2 Sep 2016 08:18:33 +0000 (08:18 +0000)
committerAlberto Garcia <berto@igalia.com>
Fri, 2 Sep 2016 08:18:33 +0000 (08:18 +0000)
===================================================================

Gbp-Pq: Name fix-ftbfs-gcc6.patch

Source/WebCore/platform/gtk/GtkClickCounter.cpp
Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp

index baa891704b12f70089705889c566cfb541311ced..7db658cbb003452202f2f7e443857ae5fbdfd136 100644 (file)
@@ -85,8 +85,8 @@ int GtkClickCounter::clickCountForGdkButtonEvent(GtkWidget* widget, GdkEventButt
     guint32 eventTime = getEventTime(event);
 
     if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
-        || ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
-            && (abs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
+        || ((fabs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
+            && (fabs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
             && (eventTime - m_previousClickTime < static_cast<guint>(doubleClickTime))
             && (buttonEvent->button == m_previousClickButton)))
         m_currentClickCount++;
index 30d7d13fdc0f861c9c6ed27cf9c4533cc320bf1d..2563be690704181314aee44cacaab31c1ceb61b9 100644 (file)
@@ -659,7 +659,7 @@ String localizedMediaTimeDescription(float time)
     if (!std::isfinite(time))
         return String::fromUTF8(_("indefinite time"));
 
-    int seconds = static_cast<int>(abs(time));
+    int seconds = static_cast<int>(fabs(time));
     int days = seconds / (60 * 60 * 24);
     int hours = seconds / (60 * 60);
     int minutes = (seconds / 60) % 60;