Changeset 175411 in webkit


Ignore:
Timestamp:
Oct 31, 2014, 10:37:25 AM (11 years ago)
Author:
Chris Dumez
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):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r175397 r175411  
     12014-10-31  Chris Dumez  <cdumez@apple.com>
     2
     3        Fix a couple of warnings in JSC reported by clang static analyzer
     4        https://bugs.webkit.org/show_bug.cgi?id=138240
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Fix a couple of warnings in JSC reported by clang static analyzer about
     9        value stored in variables never being read. This is addressed by
     10        reducing the scope of the variable or removing the variable entirely.
     11
     12        * dfg/DFGConstantFoldingPhase.cpp:
     13        (JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
     14        * runtime/VM.cpp:
     15        (JSC::VM::throwException):
     16
    1172014-10-30  Dana Burkart  <dburkart@apple.com>
    218
  • trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp

    r173993 r175411  
    493493        NodeOrigin origin = node->origin;
    494494        Edge childEdge = node->child1();
    495         Node* child = childEdge.node();
    496495
    497496        addBaseCheck(indexInBlock, node, baseValue, variant.structureSet());
     
    508507       
    509508        if (variant.alternateBase()) {
    510             child = m_insertionSet.insertConstant(indexInBlock, origin, variant.alternateBase());
     509            Node* child = m_insertionSet.insertConstant(indexInBlock, origin, variant.alternateBase());
    511510            childEdge = Edge(child, KnownCellUse);
    512511        } else
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r174789 r175411  
    661661            break;
    662662    }
    663     unsigned bytecodeOffset = stackFrame.bytecodeOffset;
    664663    if (!hasErrorInfo(exec, exception)) {
    665664        // FIXME: We should only really be adding these properties to VM generated exceptions,
     
    681680        if (callFrame && callFrame->codeBlock()) {
    682681            stackFrame = stackTrace.at(stackIndex);
    683             bytecodeOffset = stackFrame.bytecodeOffset;
    684             appendSourceToError(callFrame, static_cast<ErrorInstance*>(exception), bytecodeOffset);
     682            appendSourceToError(callFrame, static_cast<ErrorInstance*>(exception), stackFrame.bytecodeOffset);
    685683        }
    686684    }
Note: See TracChangeset for help on using the changeset viewer.