[WPE] Build cleanly with GCC 8 and ICU 60
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 May 2018 16:21:09 +0000 (16:21 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 May 2018 16:21:09 +0000 (16:21 +0000)
commit79263fe31bfd36ae41b1602169f5665c651c31c4
tree064f686ccb792481f2e10099fe7fdf5d0cea46ab
parentb3c9daf6a73003fc31aa7880445b75122048a465
[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/JavaScriptCore:

* 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
Source/JavaScriptCore/API/glib/JSCClass.cpp
Source/JavaScriptCore/API/glib/JSCValue.cpp
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/ProbeContext.h
Source/JavaScriptCore/b3/air/AirArg.h
Source/JavaScriptCore/builtins/BuiltinNames.cpp
Source/JavaScriptCore/builtins/BuiltinNames.h
Source/JavaScriptCore/dfg/DFGDoubleFormatState.h
Source/JavaScriptCore/heap/MarkedBlockInlines.h
Source/JavaScriptCore/runtime/ConfigFile.cpp
Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/ThirdParty/ChangeLog
Source/ThirdParty/xdgmime/CMakeLists.txt
Source/WTF/ChangeLog
Source/WTF/wtf/HashTable.h
Source/WTF/wtf/StdLibExtras.h
Source/WTF/wtf/Vector.h
Source/WTF/wtf/glib/WTFGType.h
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/css/CSSFontFace.cpp
Source/WebCore/css/CSSSelectorList.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/platform/Length.h
Source/WebCore/platform/graphics/Gradient.cpp
Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp
Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp
Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp
Source/WebCore/platform/network/soup/SocketStreamHandleImplSoup.cpp
Source/WebCore/platform/text/TextEncoding.cpp
Source/WebKit/ChangeLog
Source/WebKit/Platform/IPC/glib/GSocketMonitor.cpp
Source/WebKit/Shared/API/glib/WebKitContextMenu.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/CMakeLists.txt
Tools/gtk/jhbuild.modules
Tools/gtk/patches/glib-cast-function-type.patch [new file with mode: 0644]
Tools/wpe/jhbuild.modules
Tools/wpe/patches/glib-cast-function-type.patch [new file with mode: 0644]