Ignore:
Timestamp:
May 9, 2018, 9:21:09 AM (7 years ago)
Author:
Michael Catanzaro
Message:

[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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/ProbeContext.h

    r225301 r231565  
    8686    auto& from = cpu->gpr(id);
    8787    typename std::remove_const<T>::type to { };
    88     std::memcpy(&to, &from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
     88    std::memcpy(static_cast<void*>(&to), &from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
    8989    return to;
    9090}
     
    9696    auto& from = cpu->spr(id);
    9797    typename std::remove_const<T>::type to { };
    98     std::memcpy(&to, &from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
     98    std::memcpy(static_cast<void*>(&to), &from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
    9999    return to;
    100100}
Note: See TracChangeset for help on using the changeset viewer.