Changeset 246095 in webkit


Ignore:
Timestamp:
Jun 4, 2019 8:14:20 PM (5 years ago)
Author:
Michael Catanzaro
Message:

Fix miscellaneous build warnings
https://bugs.webkit.org/show_bug.cgi?id=198544

Reviewed by Don Olmstead.

Source/JavaScriptCore:

Silence -Wclass-memaccess warning in this dangerous code.

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):

Source/WebCore:

Carefully silence -Wsign-compare warnings.

  • contentextensions/DFABytecodeCompiler.cpp:

(WebCore::ContentExtensions::DFABytecodeCompiler::compile):

  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::indexForData):

  • xml/XSLStyleSheetLibxslt.cpp:

(WebCore::XSLStyleSheet::parseString):

Source/WebKit:

Carefully silence -Wsign-compare warnings.

  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::readOrMakeSalt):

Tools:

When converting to PRIVATE include directories, we accidentally dropped SYSTEM here. The
naming convention used here is a bit confusing: the *_SYSTEM_INCLUDE_DIRECTORIES actually
uses both SYSTEM and PRIVATE. We should probably clarify this.

  • TestWebKitAPI/PlatformGTK.cmake:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r246084 r246095  
     12019-06-04  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix miscellaneous build warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=198544
     5
     6        Reviewed by Don Olmstead.
     7
     8        Silence -Wclass-memaccess warning in this dangerous code.
     9
     10        * wasm/WasmInstance.cpp:
     11        (JSC::Wasm::Instance::Instance):
     12
    1132019-06-04  Yusuke Suzuki  <ysuzuki@apple.com>
    214
  • trunk/Source/JavaScriptCore/wasm/WasmInstance.cpp

    r245765 r246095  
    5656    for (unsigned i = 0; i < m_numImportFunctions; ++i)
    5757        new (importFunctionInfo(i)) ImportFunctionInfo();
    58     memset(m_globals.get(), 0, globalMemoryByteSize(m_module.get()));
     58    memset(static_cast<void*>(m_globals.get()), 0, globalMemoryByteSize(m_module.get()));
    5959    for (unsigned i = 0; i < m_module->moduleInformation().globals.size(); ++i) {
    6060        if (m_module.get().moduleInformation().globals[i].type == Anyref)
  • trunk/Source/WebCore/ChangeLog

    r246092 r246095  
     12019-06-04  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix miscellaneous build warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=198544
     5
     6        Reviewed by Don Olmstead.
     7
     8        Carefully silence -Wsign-compare warnings.
     9
     10        * contentextensions/DFABytecodeCompiler.cpp:
     11        (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
     12        * inspector/InspectorCanvas.cpp:
     13        (WebCore::InspectorCanvas::indexForData):
     14        * xml/XSLStyleSheetLibxslt.cpp:
     15        (WebCore::XSLStyleSheet::parseString):
     16
    1172019-06-04  Keith Rollin  <krollin@apple.com>
    218
  • trunk/Source/WebCore/contentextensions/DFABytecodeCompiler.cpp

    r219702 r246095  
    462462    for (const auto& linkRecord : m_linkRecords) {
    463463        uint32_t destination = m_nodeStartOffsets[linkRecord.destinationNodeIndex];
    464         RELEASE_ASSERT(destination < std::numeric_limits<int32_t>::max());
     464        RELEASE_ASSERT(destination < static_cast<uint32_t>(std::numeric_limits<int32_t>::max()));
    465465        int32_t distance = destination - linkRecord.instructionLocation;
    466466        ASSERT(abs(distance) <= abs(linkRecord.longestPossibleJump));
  • trunk/Source/WebCore/inspector/InspectorCanvas.cpp

    r245179 r246095  
    433433    });
    434434    if (index != notFound) {
    435         ASSERT(index < std::numeric_limits<int>::max());
     435        ASSERT(index < static_cast<size_t>(std::numeric_limits<int>::max()));
    436436        return static_cast<int>(index);
    437437    }
     
    527527    }
    528528
    529     ASSERT(index < std::numeric_limits<int>::max());
     529    ASSERT(index < static_cast<size_t>(std::numeric_limits<int>::max()));
    530530    return static_cast<int>(index);
    531531}
  • trunk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp

    r223476 r246095  
    146146    Checked<unsigned, RecordOverflow> unsignedSize = string.length();
    147147    unsignedSize *= sizeof(UChar);
    148     if (unsignedSize.hasOverflowed() || unsignedSize.unsafeGet() > std::numeric_limits<int>::max())
     148    if (unsignedSize.hasOverflowed() || unsignedSize.unsafeGet() > static_cast<unsigned>(std::numeric_limits<int>::max()))
    149149        return false;
    150150
  • trunk/Source/WebKit/ChangeLog

    r246093 r246095  
     12019-06-04  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix miscellaneous build warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=198544
     5
     6        Reviewed by Don Olmstead.
     7
     8        Carefully silence -Wsign-compare warnings.
     9
     10        * NetworkProcess/cache/NetworkCacheData.cpp:
     11        (WebKit::NetworkCache::readOrMakeSalt):
     12
    1132019-06-04  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp

    r245186 r246095  
    184184    auto bytesRead = read(fd, salt.data(), salt.size());
    185185    close(fd);
    186     if (bytesRead != salt.size()) {
     186    if (bytesRead != static_cast<ssize_t>(salt.size())) {
    187187        salt = makeSalt();
    188188
    189189        unlink(cpath.data());
    190190        fd = open(cpath.data(), O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
    191         bool success = write(fd, salt.data(), salt.size()) == salt.size();
     191        bool success = write(fd, salt.data(), salt.size()) == static_cast<ssize_t>(salt.size());
    192192        close(fd);
    193193        if (!success)
  • trunk/Tools/ChangeLog

    r246093 r246095  
     12019-06-04  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix miscellaneous build warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=198544
     5
     6        Reviewed by Don Olmstead.
     7
     8        When converting to PRIVATE include directories, we accidentally dropped SYSTEM here. The
     9        naming convention used here is a bit confusing: the *_SYSTEM_INCLUDE_DIRECTORIES actually
     10        uses both SYSTEM and PRIVATE. We should probably clarify this.
     11
     12        * TestWebKitAPI/PlatformGTK.cmake:
     13
    1142019-06-04  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Tools/TestWebKitAPI/PlatformGTK.cmake

    r246039 r246095  
    100100)
    101101
     102set(TestJSC_SYSTEM_INCLUDE_DIRECTORIES
     103    ${GLIB_INCLUDE_DIRS}
     104    ${GTK3_INCLUDE_DIRS}
     105)
     106
    102107set(TestJSC_PRIVATE_INCLUDE_DIRECTORIES
    103108    ${CMAKE_BINARY_DIR}
    104109    ${TESTWEBKITAPI_DIR}
    105     ${GLIB_INCLUDE_DIRS}
    106     ${GTK3_INCLUDE_DIRS}
    107110    ${THIRDPARTY_DIR}/gtest/include
    108111    ${FORWARDING_HEADERS_DIR}
Note: See TracChangeset for help on using the changeset viewer.