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


Ignore:
Timestamp:
Oct 8, 2014, 9:18:03 AM (11 years ago)
Author:
Brent Fulgham
Message:

[Win] Resolve some static analysis warnings in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137508

Reviewed by Geoffrey Garen.

  • API/tests/testapi.c:

(assertEqualsAsCharactersPtr): MSVC insists on using %Iu as its format specifier
for size_t. Make the format string conditional on Windows.

  • bytecode/Watchpoint.h:

(JSC::InlineWatchpointSet::encodeState): Silence warning about left-shifting 'state'
as a 32-bit value before OR-ing it with a 64-bit value.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode): Silence warning about operator prescedence

causing the
operation to take place before the >= test.
  • dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::endBasicBlock): Ditto (
before !=)
  • testRegExp.cpp:

(testOneRegExp): Ditto %Iu format specifier.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): Silence warning about
using a 32-bit value as part of a 64-bit calculation.

File:
1 edited

Legend:

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

    r173018 r174455  
    124124   
    125125    if (jsLength != (size_t)cfLength) {
    126         fprintf(stderr, "assertEqualsAsCharactersPtr failed: jsLength(%ld) != cfLength(%ld)\n", jsLength, cfLength);
     126#if OS(WINDOWS)
     127        fprintf(stderr, "assertEqualsAsCharactersPtr failed: jsLength(%Iu) != cfLength(%Iu)\n", jsLength, (size_t)cfLength);
     128#else
     129        fprintf(stderr, "assertEqualsAsCharactersPtr failed: jsLength(%zu) != cfLength(%zu)\n", jsLength, (size_t)cfLength);
     130#endif
    127131        failed = 1;
    128132    }
Note: See TracChangeset for help on using the changeset viewer.