Title: [261797] trunk/Source/_javascript_Core
Revision
261797
Author
[email protected]
Date
2020-05-17 22:15:07 -0700 (Sun, 17 May 2020)

Log Message

[JSC] Silence unused-but-set-parameter warnings for older compilers
https://bugs.webkit.org/show_bug.cgi?id=212006

Reviewed by Mark Lam.

GCC up to 9.x will emit unused-but-set-parameter for the sources
parameter when NumberOfRegisters is zero (the if block is eliminated)
and for destinations when also ASSERT_ENABLED is false.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupStubArgs):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (261796 => 261797)


--- trunk/Source/_javascript_Core/ChangeLog	2020-05-18 04:14:57 UTC (rev 261796)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-05-18 05:15:07 UTC (rev 261797)
@@ -1,3 +1,17 @@
+2020-05-17  Lauro Moura  <[email protected]>
+
+        [JSC] Silence unused-but-set-parameter warnings for older compilers
+        https://bugs.webkit.org/show_bug.cgi?id=212006
+
+        Reviewed by Mark Lam.
+
+        GCC up to 9.x will emit unused-but-set-parameter for the sources
+        parameter when NumberOfRegisters is zero (the if block is eliminated)
+        and for destinations when also ASSERT_ENABLED is false.
+
+        * jit/CCallHelpers.h:
+        (JSC::CCallHelpers::setupStubArgs):
+
 2020-05-16  Yusuke Suzuki  <[email protected]>
 
         [JSC] Make OutOfMemory error as instance of RangeError

Modified: trunk/Source/_javascript_Core/jit/CCallHelpers.h (261796 => 261797)


--- trunk/Source/_javascript_Core/jit/CCallHelpers.h	2020-05-18 04:14:57 UTC (rev 261796)
+++ trunk/Source/_javascript_Core/jit/CCallHelpers.h	2020-05-18 05:15:07 UTC (rev 261797)
@@ -105,6 +105,10 @@
                 if (sources[i] != destinations[i])
                     pairs.append(std::make_pair(sources[i], destinations[i]));
             }
+        } else {
+            // Silence some older compilers (GCC up to 9.X) about unused but set parameters.
+            UNUSED_PARAM(sources);
+            UNUSED_PARAM(destinations);
         }
 
 #if ASSERT_ENABLED
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to