Title: [175411] trunk/Source/_javascript_Core
Revision
175411
Author
[email protected]
Date
2014-10-31 10:37:25 -0700 (Fri, 31 Oct 2014)

Log Message

Fix a couple of warnings in JSC reported by clang static analyzer
https://bugs.webkit.org/show_bug.cgi?id=138240

Reviewed by Geoffrey Garen.

Fix a couple of warnings in JSC reported by clang static analyzer about
value stored in variables never being read. This is addressed by
reducing the scope of the variable or removing the variable entirely.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
* runtime/VM.cpp:
(JSC::VM::throwException):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (175410 => 175411)


--- trunk/Source/_javascript_Core/ChangeLog	2014-10-31 17:13:52 UTC (rev 175410)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-10-31 17:37:25 UTC (rev 175411)
@@ -1,3 +1,19 @@
+2014-10-31  Chris Dumez  <[email protected]>
+
+        Fix a couple of warnings in JSC reported by clang static analyzer
+        https://bugs.webkit.org/show_bug.cgi?id=138240
+
+        Reviewed by Geoffrey Garen.
+
+        Fix a couple of warnings in JSC reported by clang static analyzer about
+        value stored in variables never being read. This is addressed by
+        reducing the scope of the variable or removing the variable entirely.
+
+        * dfg/DFGConstantFoldingPhase.cpp:
+        (JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
+        * runtime/VM.cpp:
+        (JSC::VM::throwException):
+
 2014-10-30  Dana Burkart  <[email protected]>
 
         <rdar://problem/18821260> Prepare for the mysterious future

Modified: trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp (175410 => 175411)


--- trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp	2014-10-31 17:13:52 UTC (rev 175410)
+++ trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp	2014-10-31 17:37:25 UTC (rev 175411)
@@ -492,7 +492,6 @@
     {
         NodeOrigin origin = node->origin;
         Edge childEdge = node->child1();
-        Node* child = childEdge.node();
 
         addBaseCheck(indexInBlock, node, baseValue, variant.structureSet());
         
@@ -507,7 +506,7 @@
         }
         
         if (variant.alternateBase()) {
-            child = m_insertionSet.insertConstant(indexInBlock, origin, variant.alternateBase());
+            Node* child = m_insertionSet.insertConstant(indexInBlock, origin, variant.alternateBase());
             childEdge = Edge(child, KnownCellUse);
         } else
             childEdge.setUseKind(KnownCellUse);

Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (175410 => 175411)


--- trunk/Source/_javascript_Core/runtime/VM.cpp	2014-10-31 17:13:52 UTC (rev 175410)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp	2014-10-31 17:37:25 UTC (rev 175411)
@@ -660,7 +660,6 @@
         if (stackFrame.bytecodeOffset)
             break;
     }
-    unsigned bytecodeOffset = stackFrame.bytecodeOffset;
     if (!hasErrorInfo(exec, exception)) {
         // FIXME: We should only really be adding these properties to VM generated exceptions,
         // but the inspector currently requires these for all thrown objects.
@@ -680,8 +679,7 @@
 
         if (callFrame && callFrame->codeBlock()) {
             stackFrame = stackTrace.at(stackIndex);
-            bytecodeOffset = stackFrame.bytecodeOffset;
-            appendSourceToError(callFrame, static_cast<ErrorInstance*>(exception), bytecodeOffset);
+            appendSourceToError(callFrame, static_cast<ErrorInstance*>(exception), stackFrame.bytecodeOffset);
         }
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to