Title: [231619] releases/WebKitGTK/webkit-2.20
Revision
231619
Author
[email protected]
Date
2018-05-09 16:59:38 -0700 (Wed, 09 May 2018)

Log Message

Merge r231565 - [WPE] Build cleanly with GCC 8 and ICU 60
https://bugs.webkit.org/show_bug.cgi?id=185462

Reviewed by Carlos Alberto Lopez Perez.

Source/_javascript_Core:

* API/glib/JSCClass.cpp: Silence many -Wcast-function-type warnings.
(jsc_class_add_constructor):
(jsc_class_add_method):
* API/glib/JSCValue.cpp: Silence many -Wcast-function-type warnings.
(jsc_value_object_define_property_accessor):
(jsc_value_new_function):
* CMakeLists.txt: Build BuiltinNames.cpp with -fno-var-tracking-assignments. This was a
problem with GCC 7 too, but might as well fix it now.
* assembler/ProbeContext.h:
(JSC::Probe::CPUState::gpr const): Silence a -Wclass-memaccess warning.
(JSC::Probe::CPUState::spr const): Ditto. Assume std::remove_const is safe to clobber.
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isRepresentableAs): Silence -Wfallthrough warning.
* builtins/BuiltinNames.cpp:
(JSC::BuiltinNames::BuiltinNames): Moved from BuiltinNames.h so we can use a special flag.
* builtins/BuiltinNames.h:
(JSC::BuiltinNames::BuiltinNames): Moved to BuiltinNames.cpp.
* dfg/DFGDoubleFormatState.h:
(JSC::DFG::mergeDoubleFormatStates): Silence -Wfallthrough warnings.
* heap/MarkedBlockInlines.h:
(JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType): Silence -Wfallthrough warnings.
* runtime/ConfigFile.cpp:
(JSC::ConfigFile::canonicalizePaths): Here GCC found a genuine mistake, strncat is called
with the wrong length parameter and the result is not null-terminated. Also, silence a
-Wstringop-truncation warning as we intentionally truncate filenames that exceed PATH_MAX.
* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::partTypeString): Avoid an ICU deprecation warning.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): We were unconditionally running some BigInt code by accident.
(JSC::JSGlobalObject::visitChildren): Probably a serious bug? Fixed.

Source/ThirdParty:

* xdgmime/CMakeLists.txt: Silence -Wno-cast-function-type. I'm not fighting xdg-mime.

Source/WebCore:

* PlatformGTK.cmake: Include directories are in the wrong place.
* accessibility/AXObjectCache.cpp: Silence -Wclass-memaccess problems and leave warnings.
(WebCore::AXObjectCache::startOrEndTextMarkerDataForRange):
(WebCore::AXObjectCache::textMarkerDataForCharacterOffset):
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
(WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
* css/CSSFontFace.cpp: Silence -Wfallthrough
(WebCore::CSSFontFace::fontLoadTiming const):
* css/CSSSelectorList.cpp: Silence -Wclass-memaccess, this one is intentional.
(WebCore::CSSSelectorList::adoptSelectorVector):
* editing/TextIterator.cpp: Silence ICU deprecation warnings.
* platform/Length.h:
(WebCore::Length::operator=): More -Wclass-memaccess, looks benign.
* platform/graphics/Gradient.cpp:
(WebCore::Gradient::hash const): -Wclass-memaccess again. Leave a warning.
* platform/graphics/SurrogatePairAwareTextIterator.cpp: Silence ICU deprecation warnings.
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::FontCascade::fontForCombiningCharacterSequence const): Silence ICU deprecation.
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::FontCustomPlatformData): Silence -Wcast-function-type.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::canRenderCombiningCharacterSequence const): Silence ICU deprecation.
* platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:
(gstAllocatorFastMallocMemUnmap): Fix -Wcast-function-type.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateTracks): Fix bad printf.
(WebCore::MediaPlayerPrivateGStreamer::enableTrack): Another bad printf.
(WebCore::findHLSQueue): Fix -Wcast-function-type.
* platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
(webKitMediaClearKeyDecryptorDecrypt): Fix another bad printf.
* platform/network/soup/SocketStreamHandleImplSoup.cpp: Silence -Wcast-function-type.
(WebCore::SocketStreamHandleImpl::beginWaitingForSocketWritability):
* platform/text/TextEncoding.cpp: Silence ICU deprecration.

Source/WebKit:

* Platform/IPC/glib/GSocketMonitor.cpp:
(IPC::GSocketMonitor::start): Silence -Wcast-function-type warning.
* Shared/API/glib/WebKitContextMenu.cpp:
(webkit_context_menu_new_with_items): Ditto.

Source/WTF:

* wtf/HashTable.h:
(WTF::HashTableBucketInitializer<true>::initialize): Since -Wclass-memaccess warning. This
is probably safe enough, since it's for an empty bucket.
* wtf/StdLibExtras.h:
(WTF::bitwise_cast): Silence -Wclass-memaccess as we use type traits to ensure safety here.
* wtf/Vector.h: Ditto, all uses are safe.
* wtf/glib/WTFGType.h: Silence -Wcast-function-type.

Tools:

* TestWebKitAPI/CMakeLists.txt: Fix weird build failure, we were missing a directory. Not
sure why this was never noticed until now or why the bots are OK.
* gtk/jhbuild.modules: Add upstream patch to avoid warnings inside G_DEFINE_TYPE.
* gtk/patches/glib-cast-function-type.patch: Added.
* wpe/jhbuild.modules: Add upstream patch to avoid warnings inside G_DEFINE_TYPE.
* wpe/patches/glib-cast-function-type.patch: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1,3 +1,41 @@
+2018-05-09  Michael Catanzaro  <[email protected]>
+
+        [WPE] Build cleanly with GCC 8 and ICU 60
+        https://bugs.webkit.org/show_bug.cgi?id=185462
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        * API/glib/JSCClass.cpp: Silence many -Wcast-function-type warnings.
+        (jsc_class_add_constructor):
+        (jsc_class_add_method):
+        * API/glib/JSCValue.cpp: Silence many -Wcast-function-type warnings.
+        (jsc_value_object_define_property_accessor):
+        (jsc_value_new_function):
+        * CMakeLists.txt: Build BuiltinNames.cpp with -fno-var-tracking-assignments. This was a
+        problem with GCC 7 too, but might as well fix it now.
+        * assembler/ProbeContext.h:
+        (JSC::Probe::CPUState::gpr const): Silence a -Wclass-memaccess warning.
+        (JSC::Probe::CPUState::spr const): Ditto. Assume std::remove_const is safe to clobber.
+        * b3/air/AirArg.h:
+        (JSC::B3::Air::Arg::isRepresentableAs): Silence -Wfallthrough warning.
+        * builtins/BuiltinNames.cpp:
+        (JSC::BuiltinNames::BuiltinNames): Moved from BuiltinNames.h so we can use a special flag.
+        * builtins/BuiltinNames.h:
+        (JSC::BuiltinNames::BuiltinNames): Moved to BuiltinNames.cpp.
+        * dfg/DFGDoubleFormatState.h:
+        (JSC::DFG::mergeDoubleFormatStates): Silence -Wfallthrough warnings.
+        * heap/MarkedBlockInlines.h:
+        (JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType): Silence -Wfallthrough warnings.
+        * runtime/ConfigFile.cpp:
+        (JSC::ConfigFile::canonicalizePaths): Here GCC found a genuine mistake, strncat is called
+        with the wrong length parameter and the result is not null-terminated. Also, silence a
+        -Wstringop-truncation warning as we intentionally truncate filenames that exceed PATH_MAX.
+        * runtime/IntlDateTimeFormat.cpp:
+        (JSC::IntlDateTimeFormat::partTypeString): Avoid an ICU deprecation warning.
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init): We were unconditionally running some BigInt code by accident.
+        (JSC::JSGlobalObject::visitChildren): Probably a serious bug? Fixed.
+
 2018-04-12  Michael Catanzaro  <[email protected]>
 
         [WPE] Move libWPEWebInspectorResources.so to pkglibdir

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/assembler/ProbeContext.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/assembler/ProbeContext.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/assembler/ProbeContext.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -85,7 +85,7 @@
     CPUState* cpu = const_cast<CPUState*>(this);
     auto& from = cpu->gpr(id);
     typename std::remove_const<T>::type to { };
-    std::memcpy(&to, &from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
+    std::memcpy(static_cast<void*>(&to), &from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
     return to;
 }
 
@@ -95,7 +95,7 @@
     CPUState* cpu = const_cast<CPUState*>(this);
     auto& from = cpu->spr(id);
     typename std::remove_const<T>::type to { };
-    std::memcpy(&to, &from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
+    std::memcpy(static_cast<void*>(&to), &from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
     return to;
 }
 

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/b3/air/AirArg.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/b3/air/AirArg.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/b3/air/AirArg.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -889,6 +889,7 @@
             case Width64:
                 return B3::isRepresentableAs<int64_t>(value);
             }
+            RELEASE_ASSERT_NOT_REACHED();
         case Unsigned:
             switch (width) {
             case Width8:
@@ -901,7 +902,7 @@
                 return B3::isRepresentableAs<uint64_t>(value);
             }
         }
-        ASSERT_NOT_REACHED();
+        RELEASE_ASSERT_NOT_REACHED();
     }
 
     bool isRepresentableAs(Width, Signedness) const;
@@ -920,6 +921,7 @@
             case Width64:
                 return static_cast<int64_t>(value);
             }
+            RELEASE_ASSERT_NOT_REACHED();
         case Unsigned:
             switch (width) {
             case Width8:
@@ -932,7 +934,7 @@
                 return static_cast<uint64_t>(value);
             }
         }
-        ASSERT_NOT_REACHED();
+        RELEASE_ASSERT_NOT_REACHED();
     }
 
     template<typename T>

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/dfg/DFGDoubleFormatState.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/dfg/DFGDoubleFormatState.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/dfg/DFGDoubleFormatState.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -48,6 +48,7 @@
         case CantUseDoubleFormat:
             return CantUseDoubleFormat;
         }
+        RELEASE_ASSERT_NOT_REACHED();
     case NotUsingDoubleFormat:
         switch (b) {
         case EmptyDoubleFormatState:
@@ -57,6 +58,7 @@
         case CantUseDoubleFormat:
             return CantUseDoubleFormat;
         }
+        RELEASE_ASSERT_NOT_REACHED();
     case CantUseDoubleFormat:
         return CantUseDoubleFormat;
     }

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/heap/MarkedBlockInlines.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/heap/MarkedBlockInlines.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/heap/MarkedBlockInlines.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -388,6 +388,7 @@
                     specializedSweep<true, IsEmpty, SweepOnly, BlockHasDestructors, DontScribble, DoesNotHaveNewlyAllocated, MarksStale>(freeList, IsEmpty, SweepOnly, BlockHasDestructors, DontScribble, DoesNotHaveNewlyAllocated, MarksStale, destroyFunc);
                     return true;
                 }
+                RELEASE_ASSERT_NOT_REACHED();
             case SweepToFreeList:
                 switch (marksMode) {
                 case MarksNotStale:
@@ -398,6 +399,7 @@
                     return true;
                 }
             }
+            RELEASE_ASSERT_NOT_REACHED();
         case NotEmpty:
             switch (sweepMode) {
             case SweepOnly:
@@ -409,6 +411,7 @@
                     specializedSweep<true, NotEmpty, SweepOnly, BlockHasDestructors, DontScribble, DoesNotHaveNewlyAllocated, MarksStale>(freeList, NotEmpty, SweepOnly, BlockHasDestructors, DontScribble, DoesNotHaveNewlyAllocated, MarksStale, destroyFunc);
                     return true;
                 }
+                RELEASE_ASSERT_NOT_REACHED();
             case SweepToFreeList:
                 switch (marksMode) {
                 case MarksNotStale:

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/ConfigFile.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/ConfigFile.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/ConfigFile.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -488,8 +488,19 @@
             bool shouldAddPathSeparator = filenameBuffer[pathnameLength - 1] != '/';
             if (sizeof(filenameBuffer) - 1  >= pathnameLength + shouldAddPathSeparator) {
                 if (shouldAddPathSeparator)
-                    strncat(filenameBuffer, "/", 1);
+                    strncat(filenameBuffer, "/", 2); // Room for '/' plus NUL
+#if COMPILER(GCC)
+#if GCC_VERSION_AT_LEAST(8, 0, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
+#endif
+#endif
                 strncat(filenameBuffer, m_filename, sizeof(filenameBuffer) - strlen(filenameBuffer) - 1);
+#if COMPILER(GCC)
+#if GCC_VERSION_AT_LEAST(8, 0, 0)
+#pragma GCC diagnostic pop
+#endif
+#endif
                 strncpy(m_filename, filenameBuffer, s_maxPathLength);
                 m_filename[s_maxPathLength] = '\0';
             }

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/IntlDateTimeFormat.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/IntlDateTimeFormat.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/IntlDateTimeFormat.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -964,7 +964,7 @@
     case UDAT_STANDALONE_QUARTER_FIELD:
     case UDAT_RELATED_YEAR_FIELD:
     case UDAT_TIME_SEPARATOR_FIELD:
-#if U_ICU_VERSION_MAJOR_NUM < 58
+#if U_ICU_VERSION_MAJOR_NUM < 58 || !defined(U_HIDE_DEPRECATED_API)
     case UDAT_FIELD_COUNT:
 #endif
         return "literal";

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/JSGlobalObject.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -612,9 +612,10 @@
     m_generatorPrototype.set(vm, this, GeneratorPrototype::create(vm, this, GeneratorPrototype::createStructure(vm, this, m_iteratorPrototype.get())));
     m_asyncGeneratorPrototype.set(vm, this, AsyncGeneratorPrototype::create(vm, this, AsyncGeneratorPrototype::createStructure(vm, this, m_asyncIteratorPrototype.get())));
 
-#define CREATE_PROTOTYPE_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) \
-m_ ## lowerName ## Prototype.set(vm, this, capitalName##Prototype::create(vm, this, capitalName##Prototype::createStructure(vm, this, m_ ## prototypeBase ## Prototype.get()))); \
-m_ ## properName ## Structure.set(vm, this, instanceType::createStructure(vm, this, m_ ## lowerName ## Prototype.get()));
+#define CREATE_PROTOTYPE_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) do { \
+        m_ ## lowerName ## Prototype.set(vm, this, capitalName##Prototype::create(vm, this, capitalName##Prototype::createStructure(vm, this, m_ ## prototypeBase ## Prototype.get()))); \
+        m_ ## properName ## Structure.set(vm, this, instanceType::createStructure(vm, this, m_ ## lowerName ## Prototype.get())); \
+    } while (0);
     
     FOR_EACH_SIMPLE_BUILTIN_TYPE(CREATE_PROTOTYPE_FOR_SIMPLE_TYPE)
 
@@ -1415,9 +1416,10 @@
     visitor.append(thisObject->m_sharedArrayBufferStructure);
 #endif
 
-#define VISIT_SIMPLE_TYPE(CapitalName, lowerName, properName, instanceType, jsName, prototypeBase) \
-    visitor.append(thisObject->m_ ## lowerName ## Prototype); \
-    visitor.append(thisObject->m_ ## properName ## Structure); \
+#define VISIT_SIMPLE_TYPE(CapitalName, lowerName, properName, instanceType, jsName, prototypeBase) do { \
+        visitor.append(thisObject->m_ ## lowerName ## Prototype); \
+        visitor.append(thisObject->m_ ## properName ## Structure); \
+    } while (0);
 
     FOR_EACH_SIMPLE_BUILTIN_TYPE(VISIT_SIMPLE_TYPE)
     if (UNLIKELY(Options::useBigInt()))

Modified: releases/WebKitGTK/webkit-2.20/Source/ThirdParty/ChangeLog (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/ThirdParty/ChangeLog	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/ThirdParty/ChangeLog	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1,3 +1,12 @@
+2018-05-09  Michael Catanzaro  <[email protected]>
+
+        [WPE] Build cleanly with GCC 8 and ICU 60
+        https://bugs.webkit.org/show_bug.cgi?id=185462
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        * xdgmime/CMakeLists.txt: Silence -Wno-cast-function-type. I'm not fighting xdg-mime.
+
 2018-02-06  Don Olmstead  <[email protected]>
 
         Remove WebCore/ForwardingHeaders directory

Modified: releases/WebKitGTK/webkit-2.20/Source/ThirdParty/xdgmime/CMakeLists.txt (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/ThirdParty/xdgmime/CMakeLists.txt	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/ThirdParty/xdgmime/CMakeLists.txt	2018-05-09 23:59:38 UTC (rev 231619)
@@ -21,6 +21,7 @@
 add_library(xdgmime STATIC ${XDGMIME_SOURCES})
 
 if (COMPILER_IS_GCC_OR_CLANG)
-    WEBKIT_ADD_TARGET_C_FLAGS(xdgmime -Wno-sign-compare
+    WEBKIT_ADD_TARGET_C_FLAGS(xdgmime -Wno-cast-function-type
+                                      -Wno-sign-compare
                                       -Wno-unused-parameter)
 endif ()

Modified: releases/WebKitGTK/webkit-2.20/Source/WTF/ChangeLog (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WTF/ChangeLog	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WTF/ChangeLog	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1,3 +1,18 @@
+2018-05-09  Michael Catanzaro  <[email protected]>
+
+        [WPE] Build cleanly with GCC 8 and ICU 60
+        https://bugs.webkit.org/show_bug.cgi?id=185462
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        * wtf/HashTable.h:
+        (WTF::HashTableBucketInitializer<true>::initialize): Since -Wclass-memaccess warning. This
+        is probably safe enough, since it's for an empty bucket.
+        * wtf/StdLibExtras.h:
+        (WTF::bitwise_cast): Silence -Wclass-memaccess as we use type traits to ensure safety here.
+        * wtf/Vector.h: Ditto, all uses are safe.
+        * wtf/glib/WTFGType.h: Silence -Wcast-function-type.
+
 2018-04-08  Yusuke Suzuki  <[email protected]>
 
         Use alignas instead of compiler-specific attributes

Modified: releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/HashTable.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/HashTable.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/HashTable.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -847,7 +847,7 @@
             // This initializes the bucket without copying the empty value.
             // That makes it possible to use this with types that don't support copying.
             // The memset to 0 looks like a slow operation but is optimized by the compilers.
-            memset(std::addressof(bucket), 0, sizeof(bucket));
+            memset(static_cast<void*>(std::addressof(bucket)), 0, sizeof(bucket));
         }
     };
     

Modified: releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/StdLibExtras.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/StdLibExtras.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/StdLibExtras.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -142,7 +142,7 @@
     static_assert(__is_trivially_copyable(FromType), "bitwise_cast of non-trivially-copyable type!");
 #endif
     typename std::remove_const<ToType>::type to { };
-    std::memcpy(&to, &from, sizeof(to));
+    std::memcpy(static_cast<void*>(&to), static_cast<void*>(&from), sizeof(to));
     return to;
 }
 

Modified: releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Vector.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Vector.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Vector.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -86,7 +86,7 @@
 {
     static void initialize(T* begin, T* end) 
     {
-        memset(begin, 0, reinterpret_cast<char*>(end) - reinterpret_cast<char*>(begin));
+        memset(static_cast<void*>(begin), 0, reinterpret_cast<char*>(end) - reinterpret_cast<char*>(begin));
     }
 };
 
@@ -126,11 +126,11 @@
 {
     static void move(const T* src, const T* srcEnd, T* dst) 
     {
-        memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+        memcpy(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
     }
     static void moveOverlapping(const T* src, const T* srcEnd, T* dst) 
     {
-        memmove(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+        memmove(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
     }
 };
 
@@ -156,7 +156,7 @@
 {
     static void uninitializedCopy(const T* src, const T* srcEnd, T* dst)
     {
-        memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+        memcpy(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
     }
     template<typename U>
     static void uninitializedCopy(const T* src, const T* srcEnd, U* dst)

Modified: releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/glib/WTFGType.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/glib/WTFGType.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/glib/WTFGType.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -54,7 +54,7 @@
     G_OBJECT_CLASS(type_name##_parent_class)->finalize(object); \
 } \
 \
-static void type_name##_class_intern_init(gpointer klass) \
+static void type_name##_class_intern_init(gpointer klass, gpointer) \
 { \
     GObjectClass* gObjectClass = G_OBJECT_CLASS(klass); \
     g_type_class_add_private(klass, sizeof(TypeName##Private)); \
@@ -63,7 +63,7 @@
     gObjectClass->finalize = type_name##_finalize; \
 } \
 \
-static void type_name##_init(TypeName* self) \
+static void type_name##_init(TypeName* self, gpointer) \
 { \
     TypeName##Private* priv = G_TYPE_INSTANCE_GET_PRIVATE(self, type_name##_get_type(), TypeName##Private); \
     self->priv = priv; \

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1,3 +1,44 @@
+2018-05-09  Michael Catanzaro  <[email protected]>
+
+        [WPE] Build cleanly with GCC 8 and ICU 60
+        https://bugs.webkit.org/show_bug.cgi?id=185462
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        * PlatformGTK.cmake: Include directories are in the wrong place.
+        * accessibility/AXObjectCache.cpp: Silence -Wclass-memaccess problems and leave warnings.
+        (WebCore::AXObjectCache::startOrEndTextMarkerDataForRange):
+        (WebCore::AXObjectCache::textMarkerDataForCharacterOffset):
+        (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
+        (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
+        * css/CSSFontFace.cpp: Silence -Wfallthrough
+        (WebCore::CSSFontFace::fontLoadTiming const):
+        * css/CSSSelectorList.cpp: Silence -Wclass-memaccess, this one is intentional.
+        (WebCore::CSSSelectorList::adoptSelectorVector):
+        * editing/TextIterator.cpp: Silence ICU deprecation warnings.
+        * platform/Length.h:
+        (WebCore::Length::operator=): More -Wclass-memaccess, looks benign.
+        * platform/graphics/Gradient.cpp:
+        (WebCore::Gradient::hash const): -Wclass-memaccess again. Leave a warning.
+        * platform/graphics/SurrogatePairAwareTextIterator.cpp: Silence ICU deprecation warnings.
+        * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
+        (WebCore::FontCascade::fontForCombiningCharacterSequence const): Silence ICU deprecation.
+        * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
+        (WebCore::FontCustomPlatformData::FontCustomPlatformData): Silence -Wcast-function-type.
+        * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
+        (WebCore::Font::canRenderCombiningCharacterSequence const): Silence ICU deprecation.
+        * platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:
+        (gstAllocatorFastMallocMemUnmap): Fix -Wcast-function-type.
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::updateTracks): Fix bad printf.
+        (WebCore::MediaPlayerPrivateGStreamer::enableTrack): Another bad printf.
+        (WebCore::findHLSQueue): Fix -Wcast-function-type.
+        * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
+        (webKitMediaClearKeyDecryptorDecrypt): Fix another bad printf.
+        * platform/network/soup/SocketStreamHandleImplSoup.cpp: Silence -Wcast-function-type.
+        (WebCore::SocketStreamHandleImpl::beginWaitingForSocketWritability):
+        * platform/text/TextEncoding.cpp: Silence ICU deprecration.
+
 2018-04-25  Michael Catanzaro  <[email protected]>
 
         [WPE] Build and link against latest WPEBackend and WPEBackend-fdo

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/PlatformGTK.cmake (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/PlatformGTK.cmake	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/PlatformGTK.cmake	2018-05-09 23:59:38 UTC (rev 231619)
@@ -156,11 +156,11 @@
     )
     target_include_directories(WebCorePlatformGTK2 PRIVATE
         ${WebCore_INCLUDE_DIRECTORIES}
-        ${GTK2_INCLUDE_DIRS}
-        ${GDK2_INCLUDE_DIRS}
     )
     target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
         ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+        ${GTK2_INCLUDE_DIRS}
+        ${GDK2_INCLUDE_DIRS}
     )
     target_link_libraries(WebCorePlatformGTK2
          ${WebCore_LIBRARIES}

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/accessibility/AXObjectCache.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/accessibility/AXObjectCache.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/accessibility/AXObjectCache.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1961,7 +1961,9 @@
 
 void AXObjectCache::startOrEndTextMarkerDataForRange(TextMarkerData& textMarkerData, RefPtr<Range> range, bool isStart)
 {
-    memset(&textMarkerData, 0, sizeof(TextMarkerData));
+    // This memory must be zero'd so instances of TextMarkerData can be tested for byte-equivalence.
+    // Warning: This is risky and bad because TextMarkerData is a nontrivial type.
+    memset(static_cast<void*>(&textMarkerData), 0, sizeof(TextMarkerData));
     
     CharacterOffset characterOffset = startOrEndCharacterOffsetForRange(range, isStart);
     if (characterOffset.isNull())
@@ -2018,7 +2020,10 @@
 
 void AXObjectCache::textMarkerDataForCharacterOffset(TextMarkerData& textMarkerData, const CharacterOffset& characterOffset)
 {
-    memset(&textMarkerData, 0, sizeof(TextMarkerData));
+    // This memory must be zero'd so instances of TextMarkerData can be tested for byte-equivalence.
+    // Warning: This is risky and bad because TextMarkerData is a nontrivial type.
+    memset(static_cast<void*>(&textMarkerData), 0, sizeof(TextMarkerData));
+
     setTextMarkerDataWithCharacterOffset(textMarkerData, characterOffset);
 }
 
@@ -2198,8 +2203,9 @@
     RefPtr<AccessibilityObject> obj = cache->getOrCreate(domNode);
 
     // This memory must be zero'd so instances of TextMarkerData can be tested for byte-equivalence.
+    // Warning: This is risky and bad because TextMarkerData is a nontrivial type.
     TextMarkerData textMarkerData;
-    memset(&textMarkerData, 0, sizeof(TextMarkerData));
+    memset(static_cast<void*>(&textMarkerData), 0, sizeof(TextMarkerData));
     
     textMarkerData.axID = obj.get()->axObjectID();
     textMarkerData.node = domNode;
@@ -2226,8 +2232,9 @@
         return std::nullopt;
 
     // This memory must be zero'd so instances of TextMarkerData can be tested for byte-equivalence.
+    // Warning: This is risky and bad because TextMarkerData is a nontrivial type.
     TextMarkerData textMarkerData;
-    memset(&textMarkerData, 0, sizeof(TextMarkerData));
+    memset(static_cast<void*>(&textMarkerData), 0, sizeof(TextMarkerData));
     
     textMarkerData.axID = obj.get()->axObjectID();
     textMarkerData.node = &textControl;

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/css/CSSFontFace.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/css/CSSFontFace.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/css/CSSFontFace.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -605,6 +605,7 @@
         case FontLoadingBehavior::Optional:
             return { 0.1_s, 0_s };
         }
+        RELEASE_ASSERT_NOT_REACHED();
     case Settings::FontLoadTimingOverride::Block:
         return { Seconds::infinity(), 0_s };
     case Settings::FontLoadTimingOverride::Swap:
@@ -612,8 +613,7 @@
     case Settings::FontLoadTimingOverride::Failure:
         return { 0_s, 0_s };
     }
-    ASSERT_NOT_REACHED();
-    return { 3_s, Seconds::infinity() };
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 void CSSFontFace::setStatus(Status newStatus)

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/css/CSSSelectorList.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/css/CSSSelectorList.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/css/CSSSelectorList.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -67,7 +67,7 @@
             {
                 // Move item from the parser selector vector into m_selectorArray without invoking destructor (Ugh.)
                 CSSSelector* currentSelector = current->releaseSelector().release();
-                memcpy(&m_selectorArray[arrayIndex], currentSelector, sizeof(CSSSelector));
+                memcpy(static_cast<void*>(&m_selectorArray[arrayIndex]), static_cast<void*>(currentSelector), sizeof(CSSSelector));
 
                 // Free the underlying memory without invoking the destructor.
                 operator delete (currentSelector);

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/editing/TextIterator.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/editing/TextIterator.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/editing/TextIterator.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1999,6 +1999,12 @@
     return false;
 }
 
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+// NOTE: ICU's unorm_normalize function is deprecated.
+
 static void normalizeCharacters(const UChar* characters, unsigned length, Vector<UChar>& buffer)
 {
     ASSERT(length);
@@ -2020,6 +2026,10 @@
     ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
 }
 
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic pop
+#endif
+
 static bool isNonLatin1Separator(UChar32 character)
 {
     ASSERT_ARG(character, character >= 256);

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/Length.h (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/Length.h	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/Length.h	2018-05-09 23:59:38 UTC (rev 231619)
@@ -195,7 +195,7 @@
     if (isCalculated())
         deref();
 
-    memcpy(this, &other, sizeof(Length));
+    memcpy(static_cast<void*>(this), static_cast<void*>(const_cast<Length*>(&other)), sizeof(Length));
     return *this;
 }
 
@@ -207,7 +207,7 @@
     if (isCalculated())
         deref();
 
-    memcpy(this, &other, sizeof(Length));
+    memcpy(static_cast<void*>(this), static_cast<void*>(&other), sizeof(Length));
     other.m_type = Auto;
     return *this;
 }

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/Gradient.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/Gradient.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/Gradient.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -213,7 +213,8 @@
     COMPILE_ASSERT(!(sizeof(ColorStop) % 2), Color_stop_size_should_be_multiple_of_two);
     
     // Ensure that any padding in the struct is zero-filled, so it will not affect the hash value.
-    memset(&parameters, 0, sizeof(parameters));
+    // FIXME: This is asking for trouble, because it is a nontrivial type.
+    memset(static_cast<void*>(&parameters), 0, sizeof(parameters));
     
     WTF::switchOn(m_data,
         [&parameters] (const LinearData& data) {

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -69,6 +69,12 @@
     return true;
 }
 
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+// NOTE: ICU's unorm_normalize function is deprecated.
+
 UChar32 SurrogatePairAwareTextIterator::normalizeVoicingMarks()
 {
     // According to http://www.unicode.org/Public/UNIDATA/UCD.html#Canonical_Combining_Class_Values
@@ -89,4 +95,8 @@
     return 0;
 }
 
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic pop
+#endif
+
 }

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -49,7 +49,14 @@
 {
     UErrorCode error = U_ZERO_ERROR;
     Vector<UChar, 4> normalizedCharacters(length);
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
     int32_t normalizedLength = unorm_normalize(characters, length, UNORM_NFC, UNORM_UNICODE_3_2, normalizedCharacters.data(), length, &error);
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic pop
+#endif
     if (U_FAILURE(error))
         return nullptr;
 

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -48,7 +48,7 @@
     // this cairo_font_face_t is destroyed, it cleans up the FreeType face as well.
     static cairo_user_data_key_t freeTypeFaceKey;
     cairo_font_face_set_user_data(m_fontFace, &freeTypeFaceKey, freeTypeFace,
-         reinterpret_cast<cairo_destroy_func_t>(FT_Done_Face));
+        reinterpret_cast<cairo_destroy_func_t>(reinterpret_cast<GCallback>(FT_Done_Face)));
 }
 
 FontCustomPlatformData::~FontCustomPlatformData()

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -199,7 +199,14 @@
 
     UErrorCode error = U_ZERO_ERROR;
     Vector<UChar, 4> normalizedCharacters(length);
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
     int32_t normalizedLength = unorm_normalize(characters, length, UNORM_NFC, UNORM_UNICODE_3_2, &normalizedCharacters[0], length, &error);
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic pop
+#endif
     if (U_FAILURE(error))
         return false;
 

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -86,9 +86,8 @@
     return memory->data;
 }
 
-static gboolean gstAllocatorFastMallocMemUnmap(GstMemoryFastMalloc*)
+static void gstAllocatorFastMallocMemUnmap(GstMemoryFastMalloc*)
 {
-    return TRUE;
 }
 
 static GstMemoryFastMalloc* gstAllocatorFastMallocMemCopy(GstMemoryFastMalloc* memory, gssize offset, gsize size)

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1232,8 +1232,9 @@
 }
 #endif
 
-static int findHLSQueue(const GValue* item)
+static gint findHLSQueue(gconstpointer a, gconstpointer)
 {
+    GValue* item = static_cast<GValue*>(const_cast<gpointer>(a));
     GstElement* element = GST_ELEMENT(g_value_get_object(item));
     if (g_str_has_prefix(GST_ELEMENT_NAME(element), "queue")) {
         GstElement* parent = GST_ELEMENT(GST_ELEMENT_PARENT(element));

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -255,7 +255,7 @@
 
     if (!subSampleCount) {
         // Full sample encryption.
-        GST_TRACE_OBJECT(self, "full sample encryption: %d encrypted bytes", map.size);
+        GST_TRACE_OBJECT(self, "full sample encryption: %zu encrypted bytes", map.size);
 
         // Check if the buffer is empty.
         if (map.size) {

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -268,7 +268,7 @@
 
     m_writeReadySource = adoptGRef(g_pollable_output_stream_create_source(m_outputStream.get(), m_cancellable.get()));
     ref();
-    g_source_set_callback(m_writeReadySource.get(), reinterpret_cast<GSourceFunc>(writeReadyCallback), this, [](gpointer handle) { 
+    g_source_set_callback(m_writeReadySource.get(), reinterpret_cast<GSourceFunc>(reinterpret_cast<GCallback>(writeReadyCallback)), this, [](gpointer handle) {
         static_cast<SocketStreamHandleImpl*>(handle)->deref();
     });
     g_source_attach(m_writeReadySource.get(), g_main_context_get_thread_default());

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/text/TextEncoding.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/text/TextEncoding.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/text/TextEncoding.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -69,6 +69,12 @@
     return newTextCodec(*this)->decode(data, length, true, stopOnError, sawError);
 }
 
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+// NOTE: ICU's unorm_quickCheck and unorm_normalize functions are deprecated.
+
 Vector<uint8_t> TextEncoding::encode(StringView text, UnencodableHandling handling) const
 {
     if (!m_name || text.isEmpty())
@@ -106,6 +112,10 @@
     return newTextCodec(*this)->encode(StringView { source, sourceLength }, handling);
 }
 
+#if COMPILER(GCC_OR_CLANG)
+#pragma GCC diagnostic pop
+#endif
+
 const char* TextEncoding::domName() const
 {
     if (noExtendedTextEncodingNameUsed())

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1,3 +1,15 @@
+2018-05-09  Michael Catanzaro  <[email protected]>
+
+        [WPE] Build cleanly with GCC 8 and ICU 60
+        https://bugs.webkit.org/show_bug.cgi?id=185462
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        * Platform/IPC/glib/GSocketMonitor.cpp:
+        (IPC::GSocketMonitor::start): Silence -Wcast-function-type warning.
+        * Shared/API/glib/WebKitContextMenu.cpp:
+        (webkit_context_menu_new_with_items): Ditto.
+
 2018-04-25  Michael Catanzaro  <[email protected]>
 
         [WPE] Build and link against latest WPEBackend and WPEBackend-fdo

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/Platform/IPC/glib/GSocketMonitor.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/Platform/IPC/glib/GSocketMonitor.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/Platform/IPC/glib/GSocketMonitor.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -51,7 +51,7 @@
     m_source = adoptGRef(g_socket_create_source(socket, condition, m_cancellable.get()));
     g_source_set_name(m_source.get(), "[WebKit] Socket monitor");
     m_callback = WTFMove(callback);
-    g_source_set_callback(m_source.get(), reinterpret_cast<GSourceFunc>(socketSourceCallback), this, nullptr);
+    g_source_set_callback(m_source.get(), reinterpret_cast<GSourceFunc>(reinterpret_cast<GCallback>(socketSourceCallback)), this, nullptr);
     g_source_set_priority(m_source.get(), RunLoopSourcePriority::RunLoopDispatcher);
     g_source_attach(m_source.get(), runLoop.mainContext());
 }

Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/Shared/API/glib/WebKitContextMenu.cpp (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Source/WebKit/Shared/API/glib/WebKitContextMenu.cpp	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/Shared/API/glib/WebKitContextMenu.cpp	2018-05-09 23:59:38 UTC (rev 231619)
@@ -136,7 +136,7 @@
 WebKitContextMenu* webkit_context_menu_new_with_items(GList* items)
 {
     WebKitContextMenu* menu = webkit_context_menu_new();
-    g_list_foreach(items, reinterpret_cast<GFunc>(g_object_ref_sink), 0);
+    g_list_foreach(items, reinterpret_cast<GFunc>(reinterpret_cast<GCallback>(g_object_ref_sink)), 0);
     menu->priv->items = g_list_copy(items);
 
     return menu;

Modified: releases/WebKitGTK/webkit-2.20/Tools/ChangeLog (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Tools/ChangeLog	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Tools/ChangeLog	2018-05-09 23:59:38 UTC (rev 231619)
@@ -1,3 +1,17 @@
+2018-05-09  Michael Catanzaro  <[email protected]>
+
+        [WPE] Build cleanly with GCC 8 and ICU 60
+        https://bugs.webkit.org/show_bug.cgi?id=185462
+
+        Reviewed by Carlos Alberto Lopez Perez.
+
+        * TestWebKitAPI/CMakeLists.txt: Fix weird build failure, we were missing a directory. Not
+        sure why this was never noticed until now or why the bots are OK.
+        * gtk/jhbuild.modules: Add upstream patch to avoid warnings inside G_DEFINE_TYPE.
+        * gtk/patches/glib-cast-function-type.patch: Added.
+        * wpe/jhbuild.modules: Add upstream patch to avoid warnings inside G_DEFINE_TYPE.
+        * wpe/patches/glib-cast-function-type.patch: Added.
+
 2018-04-25  Michael Catanzaro  <[email protected]>
 
         [WPE] Build and link against latest WPEBackend and WPEBackend-fdo

Modified: releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/CMakeLists.txt (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/CMakeLists.txt	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Tools/TestWebKitAPI/CMakeLists.txt	2018-05-09 23:59:38 UTC (rev 231619)
@@ -178,6 +178,7 @@
     ${WEBKIT_DIR}/Shared/Plugins
     ${WEBKIT_DIR}/UIProcess
     ${WEBKIT_DIR}/UIProcess/API
+    ${WEBKIT_DIR}/UIProcess/API/C
     ${WEBKIT_DIR}/WebProcess/InjectedBundle
     ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/c
 )

Modified: releases/WebKitGTK/webkit-2.20/Tools/gtk/jhbuild.modules (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Tools/gtk/jhbuild.modules	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Tools/gtk/jhbuild.modules	2018-05-09 23:59:38 UTC (rev 231619)
@@ -218,6 +218,7 @@
             hash="sha256:bb89e5c5aad33169a8c7f28b45671c7899c12f74caf707737f784d7102758e6c">
       <!-- This patch landed in glib-2-54 branch and will be available in 2.54.3. -->
       <patch file="glib-gtester-do-not-consider-skipped-tests-as-failures.patch" strip="1"/>
+      <patch file="glib-cast-function-type.patch" strip="1"/>
     </branch>
   </autotools>
 

Added: releases/WebKitGTK/webkit-2.20/Tools/gtk/patches/glib-cast-function-type.patch (0 => 231619)


--- releases/WebKitGTK/webkit-2.20/Tools/gtk/patches/glib-cast-function-type.patch	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.20/Tools/gtk/patches/glib-cast-function-type.patch	2018-05-09 23:59:38 UTC (rev 231619)
@@ -0,0 +1,54 @@
+From c1f5e52844c3bf503aca8881b6af68f78f028b4d Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <[email protected]>
+Date: Wed, 7 Feb 2018 17:27:54 +0000
+Subject: [PATCH] gtype: cast *_init functions to void(*)(void) first
+
+The *_init() functions have prototypes incompatible with *InitFunc types they
+are being cast to. This upsets GCC 8's -Wcast-function-type that's enabled by
+default with -Wextra.
+
+Let's not have the public header files emit a warning and neutralize it by
+doing a void(*)(void) cast first.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=793272
+---
+ gobject/gtype.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gobject/gtype.h b/gobject/gtype.h
+index f771c07..608efb2 100644
+--- a/gobject/gtype.h
++++ b/gobject/gtype.h
+@@ -1790,7 +1790,7 @@ guint     g_type_get_type_registration_serial (void);
+  */
+ #define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)       { \
+   const GInterfaceInfo g_implement_interface_info = { \
+-    (GInterfaceInitFunc) iface_init, NULL, NULL \
++    (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \
+   }; \
+   g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \
+ }
+@@ -1974,9 +1974,9 @@ type_name##_get_type (void) \
+         g_type_register_static_simple (TYPE_PARENT, \
+                                        g_intern_static_string (#TypeName), \
+                                        sizeof (TypeName##Class), \
+-                                       (GClassInitFunc) type_name##_class_intern_init, \
++                                       (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \
+                                        sizeof (TypeName), \
+-                                       (GInstanceInitFunc) type_name##_init, \
++                                       (GInstanceInitFunc)(void (*)(void)) type_name##_init, \
+                                        (GTypeFlags) flags); \
+       { /* custom code follows */
+ #define _G_DEFINE_TYPE_EXTENDED_END()	\
+@@ -2008,7 +2008,7 @@ type_name##_get_type (void) \
+         g_type_register_static_simple (G_TYPE_INTERFACE, \
+                                        g_intern_static_string (#TypeName), \
+                                        sizeof (TypeName##Interface), \
+-                                       (GClassInitFunc)type_name##_default_init, \
++                                       (GClassInitFunc)(GVoidFunc)type_name##_default_init, \
+                                        0, \
+                                        (GInstanceInitFunc)NULL, \
+                                        (GTypeFlags) 0); \
+--
+libgit2 0.27.0
+

Modified: releases/WebKitGTK/webkit-2.20/Tools/wpe/jhbuild.modules (231618 => 231619)


--- releases/WebKitGTK/webkit-2.20/Tools/wpe/jhbuild.modules	2018-05-09 23:59:27 UTC (rev 231618)
+++ releases/WebKitGTK/webkit-2.20/Tools/wpe/jhbuild.modules	2018-05-09 23:59:38 UTC (rev 231619)
@@ -76,6 +76,7 @@
             hash="sha256:963fdc6685dc3da8e5381dfb9f15ca4b5709b28be84d9d05a9bb8e446abac0a8">
       <patch file="gdate-suppress-string-format-literal-warning.patch" strip="1"/>
       <patch file="glib-revert-wakeup-changes.patch" strip="1"/>
+      <patch file="glib-cast-function-type.patch" strip="1"/>
     </branch>
   </autotools>
 

Added: releases/WebKitGTK/webkit-2.20/Tools/wpe/patches/glib-cast-function-type.patch (0 => 231619)


--- releases/WebKitGTK/webkit-2.20/Tools/wpe/patches/glib-cast-function-type.patch	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.20/Tools/wpe/patches/glib-cast-function-type.patch	2018-05-09 23:59:38 UTC (rev 231619)
@@ -0,0 +1,54 @@
+From c1f5e52844c3bf503aca8881b6af68f78f028b4d Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <[email protected]>
+Date: Wed, 7 Feb 2018 17:27:54 +0000
+Subject: [PATCH] gtype: cast *_init functions to void(*)(void) first
+
+The *_init() functions have prototypes incompatible with *InitFunc types they
+are being cast to. This upsets GCC 8's -Wcast-function-type that's enabled by
+default with -Wextra.
+
+Let's not have the public header files emit a warning and neutralize it by
+doing a void(*)(void) cast first.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=793272
+---
+ gobject/gtype.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gobject/gtype.h b/gobject/gtype.h
+index f771c07..608efb2 100644
+--- a/gobject/gtype.h
++++ b/gobject/gtype.h
+@@ -1790,7 +1790,7 @@ guint     g_type_get_type_registration_serial (void);
+  */
+ #define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)       { \
+   const GInterfaceInfo g_implement_interface_info = { \
+-    (GInterfaceInitFunc) iface_init, NULL, NULL \
++    (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \
+   }; \
+   g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \
+ }
+@@ -1974,9 +1974,9 @@ type_name##_get_type (void) \
+         g_type_register_static_simple (TYPE_PARENT, \
+                                        g_intern_static_string (#TypeName), \
+                                        sizeof (TypeName##Class), \
+-                                       (GClassInitFunc) type_name##_class_intern_init, \
++                                       (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \
+                                        sizeof (TypeName), \
+-                                       (GInstanceInitFunc) type_name##_init, \
++                                       (GInstanceInitFunc)(void (*)(void)) type_name##_init, \
+                                        (GTypeFlags) flags); \
+       { /* custom code follows */
+ #define _G_DEFINE_TYPE_EXTENDED_END()	\
+@@ -2008,7 +2008,7 @@ type_name##_get_type (void) \
+         g_type_register_static_simple (G_TYPE_INTERFACE, \
+                                        g_intern_static_string (#TypeName), \
+                                        sizeof (TypeName##Interface), \
+-                                       (GClassInitFunc)type_name##_default_init, \
++                                       (GClassInitFunc)(GVoidFunc)type_name##_default_init, \
+                                        0, \
+                                        (GInstanceInitFunc)NULL, \
+                                        (GTypeFlags) 0); \
+--
+libgit2 0.27.0
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to