Title: [246095] trunk
Revision
246095
Author
[email protected]
Date
2019-06-04 20:14:20 -0700 (Tue, 04 Jun 2019)

Log Message

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

Reviewed by Don Olmstead.

Source/_javascript_Core:

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:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (246094 => 246095)


--- trunk/Source/_javascript_Core/ChangeLog	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-06-05 03:14:20 UTC (rev 246095)
@@ -1,3 +1,15 @@
+2019-06-04  Michael Catanzaro  <[email protected]>
+
+        Fix miscellaneous build warnings
+        https://bugs.webkit.org/show_bug.cgi?id=198544
+
+        Reviewed by Don Olmstead.
+
+        Silence -Wclass-memaccess warning in this dangerous code.
+
+        * wasm/WasmInstance.cpp:
+        (JSC::Wasm::Instance::Instance):
+
 2019-06-04  Yusuke Suzuki  <[email protected]>
 
         Unreviewed, update exception scope for putByIndexBeyondVectorLength

Modified: trunk/Source/_javascript_Core/wasm/WasmInstance.cpp (246094 => 246095)


--- trunk/Source/_javascript_Core/wasm/WasmInstance.cpp	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Source/_javascript_Core/wasm/WasmInstance.cpp	2019-06-05 03:14:20 UTC (rev 246095)
@@ -55,7 +55,7 @@
 {
     for (unsigned i = 0; i < m_numImportFunctions; ++i)
         new (importFunctionInfo(i)) ImportFunctionInfo();
-    memset(m_globals.get(), 0, globalMemoryByteSize(m_module.get()));
+    memset(static_cast<void*>(m_globals.get()), 0, globalMemoryByteSize(m_module.get()));
     for (unsigned i = 0; i < m_module->moduleInformation().globals.size(); ++i) {
         if (m_module.get().moduleInformation().globals[i].type == Anyref)
             m_globalsToMark.set(i);

Modified: trunk/Source/WebCore/ChangeLog (246094 => 246095)


--- trunk/Source/WebCore/ChangeLog	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Source/WebCore/ChangeLog	2019-06-05 03:14:20 UTC (rev 246095)
@@ -1,3 +1,19 @@
+2019-06-04  Michael Catanzaro  <[email protected]>
+
+        Fix miscellaneous build warnings
+        https://bugs.webkit.org/show_bug.cgi?id=198544
+
+        Reviewed by Don Olmstead.
+
+        Carefully silence -Wsign-compare warnings.
+
+        * contentextensions/DFABytecodeCompiler.cpp:
+        (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
+        * inspector/InspectorCanvas.cpp:
+        (WebCore::InspectorCanvas::indexForData):
+        * xml/XSLStyleSheetLibxslt.cpp:
+        (WebCore::XSLStyleSheet::parseString):
+
 2019-06-04  Keith Rollin  <[email protected]>
 
         Fix 64-bit vs 32-bit mismatch in ISOFairPlayStreamingPsshBox.cpp

Modified: trunk/Source/WebCore/contentextensions/DFABytecodeCompiler.cpp (246094 => 246095)


--- trunk/Source/WebCore/contentextensions/DFABytecodeCompiler.cpp	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Source/WebCore/contentextensions/DFABytecodeCompiler.cpp	2019-06-05 03:14:20 UTC (rev 246095)
@@ -461,7 +461,7 @@
     // Link.
     for (const auto& linkRecord : m_linkRecords) {
         uint32_t destination = m_nodeStartOffsets[linkRecord.destinationNodeIndex];
-        RELEASE_ASSERT(destination < std::numeric_limits<int32_t>::max());
+        RELEASE_ASSERT(destination < static_cast<uint32_t>(std::numeric_limits<int32_t>::max()));
         int32_t distance = destination - linkRecord.instructionLocation;
         ASSERT(abs(distance) <= abs(linkRecord.longestPossibleJump));
         

Modified: trunk/Source/WebCore/inspector/InspectorCanvas.cpp (246094 => 246095)


--- trunk/Source/WebCore/inspector/InspectorCanvas.cpp	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Source/WebCore/inspector/InspectorCanvas.cpp	2019-06-05 03:14:20 UTC (rev 246095)
@@ -432,7 +432,7 @@
         return false;
     });
     if (index != notFound) {
-        ASSERT(index < std::numeric_limits<int>::max());
+        ASSERT(index < static_cast<size_t>(std::numeric_limits<int>::max()));
         return static_cast<int>(index);
     }
 
@@ -526,7 +526,7 @@
         index = m_indexedDuplicateData.size() - 1;
     }
 
-    ASSERT(index < std::numeric_limits<int>::max());
+    ASSERT(index < static_cast<size_t>(std::numeric_limits<int>::max()));
     return static_cast<int>(index);
 }
 

Modified: trunk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp (246094 => 246095)


--- trunk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp	2019-06-05 03:14:20 UTC (rev 246095)
@@ -145,7 +145,7 @@
     const char* buffer = reinterpret_cast<const char*>(upconvertedCharacters.get());
     Checked<unsigned, RecordOverflow> unsignedSize = string.length();
     unsignedSize *= sizeof(UChar);
-    if (unsignedSize.hasOverflowed() || unsignedSize.unsafeGet() > std::numeric_limits<int>::max())
+    if (unsignedSize.hasOverflowed() || unsignedSize.unsafeGet() > static_cast<unsigned>(std::numeric_limits<int>::max()))
         return false;
 
     int size = static_cast<int>(unsignedSize.unsafeGet());

Modified: trunk/Source/WebKit/ChangeLog (246094 => 246095)


--- trunk/Source/WebKit/ChangeLog	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Source/WebKit/ChangeLog	2019-06-05 03:14:20 UTC (rev 246095)
@@ -1,3 +1,15 @@
+2019-06-04  Michael Catanzaro  <[email protected]>
+
+        Fix miscellaneous build warnings
+        https://bugs.webkit.org/show_bug.cgi?id=198544
+
+        Reviewed by Don Olmstead.
+
+        Carefully silence -Wsign-compare warnings.
+
+        * NetworkProcess/cache/NetworkCacheData.cpp:
+        (WebKit::NetworkCache::readOrMakeSalt):
+
 2019-06-04  Youenn Fablet  <[email protected]>
 
         getUserMedia requests should be processed sequentially in UIProcess

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp (246094 => 246095)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp	2019-06-05 03:14:20 UTC (rev 246095)
@@ -183,12 +183,12 @@
     Salt salt;
     auto bytesRead = read(fd, salt.data(), salt.size());
     close(fd);
-    if (bytesRead != salt.size()) {
+    if (bytesRead != static_cast<ssize_t>(salt.size())) {
         salt = makeSalt();
 
         unlink(cpath.data());
         fd = open(cpath.data(), O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
-        bool success = write(fd, salt.data(), salt.size()) == salt.size();
+        bool success = write(fd, salt.data(), salt.size()) == static_cast<ssize_t>(salt.size());
         close(fd);
         if (!success)
             return { };

Modified: trunk/Tools/ChangeLog (246094 => 246095)


--- trunk/Tools/ChangeLog	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Tools/ChangeLog	2019-06-05 03:14:20 UTC (rev 246095)
@@ -1,3 +1,16 @@
+2019-06-04  Michael Catanzaro  <[email protected]>
+
+        Fix miscellaneous build warnings
+        https://bugs.webkit.org/show_bug.cgi?id=198544
+
+        Reviewed by Don Olmstead.
+
+        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:
+
 2019-06-04  Youenn Fablet  <[email protected]>
 
         getUserMedia requests should be processed sequentially in UIProcess

Modified: trunk/Tools/TestWebKitAPI/PlatformGTK.cmake (246094 => 246095)


--- trunk/Tools/TestWebKitAPI/PlatformGTK.cmake	2019-06-05 02:21:26 UTC (rev 246094)
+++ trunk/Tools/TestWebKitAPI/PlatformGTK.cmake	2019-06-05 03:14:20 UTC (rev 246095)
@@ -99,11 +99,14 @@
     Tests/_javascript_Core/glib/TestJSC.cpp
 )
 
+set(TestJSC_SYSTEM_INCLUDE_DIRECTORIES
+    ${GLIB_INCLUDE_DIRS}
+    ${GTK3_INCLUDE_DIRS}
+)
+
 set(TestJSC_PRIVATE_INCLUDE_DIRECTORIES
     ${CMAKE_BINARY_DIR}
     ${TESTWEBKITAPI_DIR}
-    ${GLIB_INCLUDE_DIRS}
-    ${GTK3_INCLUDE_DIRS}
     ${THIRDPARTY_DIR}/gtest/include
     ${FORWARDING_HEADERS_DIR}
     ${FORWARDING_HEADERS_DIR}/_javascript_Core
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to