[GTK] Fix build with Clang after r219605.
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 11:21:53 +0000 (11:21 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 11:21:53 +0000 (11:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=166682

Unreviewed build fix.

Clang-3.8 complains with the following error:
non-constant-expression cannot be narrowed from type 'gboolean' (aka 'int') to 'bool' in initializer list [-Wc++11-narrowing]

* glib/SessionHostGlib.cpp: insert an explicit cast to silence this issue.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219608 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebDriver/ChangeLog
Source/WebDriver/glib/SessionHostGlib.cpp

index d03622934e6c38d5558d1cf197c89ddd10d1d61f..6ccf18d0585975d8ffe7cb65f56f1dfc367b53cb 100644 (file)
@@ -1,3 +1,15 @@
+2017-07-18  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [GTK] Fix build with Clang after r219605.
+        https://bugs.webkit.org/show_bug.cgi?id=166682
+
+        Unreviewed build fix.
+
+        Clang-3.8 complains with the following error:
+        non-constant-expression cannot be narrowed from type 'gboolean' (aka 'int') to 'bool' in initializer list [-Wc++11-narrowing]
+
+        * glib/SessionHostGlib.cpp: insert an explicit cast to silence this issue.
+
 2017-07-13  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Add initial implementation of WebDriver process to run the HTTP server
index e223918036ab56ff3074eaaa8083c2dc8160dd42..5112e77f67ab7ec408715902e4cb964027d23658 100644 (file)
@@ -77,7 +77,7 @@ const GDBusInterfaceVTable SessionHost::s_interfaceVTable = {
             gboolean isPaired;
             while (g_variant_iter_loop(iter.get(), "(t&s&s&sb)", &targetID, &type, &name, &dummy, &isPaired)) {
                 if (!g_strcmp0(type, "Automation"))
-                    targetList.uncheckedAppend({ targetID, name, isPaired });
+                    targetList.uncheckedAppend({ targetID, name, static_cast<bool>(isPaired) });
             }
             sessionHost->setTargetList(connectionID, WTFMove(targetList));
             g_dbus_method_invocation_return_value(invocation, nullptr);