Changeset 40059 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Jan 20, 2009, 10:25:30 AM (16 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2009-01-20 Darin Adler <Darin Adler>

Reviewed by Mark Rowe.

Bug 23352: Turn on more compiler warnings in the Mac build
https://bugs.webkit.org/show_bug.cgi?id=23352

First patch: Fix some simple cases of various warnings.

  • pcre/pcre_compile.cpp: (jsRegExpCompile): Use const_cast to change const-ness.
  • runtime/StringPrototype.cpp: (JSC::substituteBackreferences): Remove unneeded initialization and use UChar instead of unsigned short for UTF-16 values.
  • wtf/dtoa.cpp: (WTF::strtod): Use const_cast to change const-ness.

WebCore:

2009-01-20 Darin Adler <Darin Adler>

Reviewed by Mark Rowe.

Bug 23352: Turn on more compiler warnings in the Mac build
https://bugs.webkit.org/show_bug.cgi?id=23352

First patch: Fix some simple cases of various warnings.

  • platform/DeprecatedPtrListImpl.cpp: (WebCore::DeprecatedPtrListImpl::insert): Use const_cast to change const-ness.
  • platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::containsCharacters): Ditto.
  • platform/text/PlatformString.h: Overload for short and unsigned short to avoid ambiguity leading to warnings.
  • platform/text/String.cpp: (WebCore::String::number): Implemented overloads.
  • platform/text/TextStream.cpp: (WebCore::TextStream::operator<<): Overload for bool to avoid ambiguity leading to warnings.
  • platform/text/TextStream.h: Ditto.
  • rendering/InlineFlowBox.h: Fix declaration that was specifying the wrong type.
  • svg/graphics/filters/cg/WKLinearTransferFilter.m: Fix stray characters after #endif that should be a comment instead.
  • svg/graphics/filters/cg/WKSpecularLightingFilter.h: Ditto.
  • xml/XPathPath.h: Remove unneeded redundant declaration.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/StringPrototype.cpp

    r40046 r40059  
    136136    UString substitutedReplacement;
    137137    int offset = 0;
    138     int i = -1;
     138    int i;
    139139    while ((i = replacement.find('$', i + 1)) != -1) {
    140140        if (i + 1 == replacement.size())
    141141            break;
    142142
    143         unsigned short ref = replacement[i + 1];
     143        UChar ref = replacement[i + 1];
    144144        if (ref == '$') {
    145145            // "$$" -> "$"
Note: See TracChangeset for help on using the changeset viewer.