Fix -Wc++11-narrowing on unsigned char platforms like FreeBSD/aarch64
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 15:51:39 +0000 (15:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 15:51:39 +0000 (15:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197148

Patch by Greg V <greg@unrelenting.technology> on 2019-04-24
Reviewed by Alex Christensen.

* contentextensions/DFACombiner.cpp:
* contentextensions/NFAToDFA.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244591 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/contentextensions/DFACombiner.cpp
Source/WebCore/contentextensions/NFAToDFA.cpp

index 0e0f4d1..6b199ee 100644 (file)
@@ -1,3 +1,13 @@
+2019-04-24  Greg V  <greg@unrelenting.technology>
+
+        Fix -Wc++11-narrowing on unsigned char platforms like FreeBSD/aarch64
+        https://bugs.webkit.org/show_bug.cgi?id=197148
+
+        Reviewed by Alex Christensen.
+
+        * contentextensions/DFACombiner.cpp:
+        * contentextensions/NFAToDFA.cpp:
+
 2019-04-24  Chris Dumez  <cdumez@apple.com>
 
         X-Frame-Options header should be ignored when frame-ancestors CSP directive is present
index f8f7ede..afbaeaa 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 namespace ContentExtensions {
 
 class DFAMerger {
-    typedef MutableRangeList<char, uint64_t, 128> CombinedTransitionsMutableRangeList;
+    typedef MutableRangeList<signed char, uint64_t, 128> CombinedTransitionsMutableRangeList;
 
     enum class WhichDFA {
         A,
index eaea405..ecd824e 100644 (file)
@@ -41,9 +41,9 @@ namespace WebCore {
 
 namespace ContentExtensions {
 
-typedef MutableRange<char, NFANodeIndexSet> NFANodeRange;
-typedef MutableRangeList<char, NFANodeIndexSet> NFANodeRangeList;
-typedef MutableRangeList<char, NFANodeIndexSet, 128> PreallocatedNFANodeRangeList;
+typedef MutableRange<signed char, NFANodeIndexSet> NFANodeRange;
+typedef MutableRangeList<signed char, NFANodeIndexSet> NFANodeRangeList;
+typedef MutableRangeList<signed char, NFANodeIndexSet, 128> PreallocatedNFANodeRangeList;
 typedef Vector<uint32_t, 0, ContentExtensionsOverflowHandler> UniqueNodeList;
 typedef Vector<UniqueNodeList, 0, ContentExtensionsOverflowHandler> NFANodeClosures;