Changeset 93017 in webkit for trunk/Source/JavaScriptCore/API


Ignore:
Timestamp:
Aug 13, 2011, 10:48:53 AM (14 years ago)
Author:
[email protected]
Message:

Fix a bunch of minor bugs caught by the clang static analyzer in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=66182

Reviewed by Dan Bernstein.

Fixes 10 warnings in JavaScriptCore and 2 in testapi.

  • API/tests/testapi.c:

(main):
Remove dead variables.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):
Initialize hasPrinted and silence an unused warning by casting to void (Ok here
since it is debug code and I want to keep it clear that if other cases are added,
the hasPrinted flag would be needed).

  • wtf/dtoa.cpp:

(WTF::d2b):
The variable "de" in the else block is always zero, so there is no reason to
use it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/tests/testapi.c

    r88313 r93017  
    13671367    ASSERT(function && !exception);
    13681368    JSValueRef arguments[] = { JSValueMakeNumber(context, 2) };
    1369     v = JSObjectCallAsFunction(context, function, NULL, 1, arguments, &exception);
     1369    JSObjectCallAsFunction(context, function, NULL, 1, arguments, &exception);
    13701370    JSStringRelease(foo);
    13711371    JSStringRelease(functionBody);
     
    14941494    nullDefinition = kJSClassDefinitionEmpty;
    14951495    nullClass = JSClassCreate(&nullDefinition);
    1496     myConstructor = JSObjectMakeConstructor(context, nullClass, 0);
     1496    JSObjectMakeConstructor(context, nullClass, 0);
    14971497    JSClassRelease(nullClass);
    14981498
Note: See TracChangeset for help on using the changeset viewer.