Changeset 38024 in webkit


Ignore:
Timestamp:
Oct 30, 2008 10:36:06 PM (15 years ago)
Author:
timothy@apple.com
Message:

Add parentheses to fix some gcc warnings.

JavaScriptCore:

2008-10-30 Benjamin K. Stuhl <bks24@cornell.edu>

gcc 4.3.3/linux-x86 generates "suggest parentheses around && within
"

warnings; add some parentheses to disambiguate things. No functional
changes, so no tests.

https://bugs.webkit.org/show_bug.cgi?id=21973
Add parentheses to clean up some gcc warnings

Reviewed by Dan Bernstein.

  • wtf/ASCIICType.h: (WTF::isASCIIAlphanumeric): (WTF::isASCIIHexDigit):

WebCore:

2008-10-30 Benjamin K. Stuhl <bks24@cornell.edu>

gcc 4.3.3/linux-x86 generates "suggest parentheses around && within
"

warnings; add some parentheses to disambiguate things. No functional
changes, so no tests.

https://bugs.webkit.org/show_bug.cgi?id=21973
Add parentheses to clean up some gcc warnings

Reviewed by Dan Bernstein.

  • platform/graphics/Font.h: (WebCore::Font::treatAsZeroWidthSpace):
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r38022 r38024  
     12008-10-30  Benjamin K. Stuhl  <bks24@cornell.edu>
     2
     3        gcc 4.3.3/linux-x86 generates "suggest parentheses around && within ||"
     4        warnings; add some parentheses to disambiguate things. No functional
     5        changes, so no tests.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=21973
     8        Add parentheses to clean up some gcc warnings
     9
     10        Reviewed by Dan Bernstein.
     11
     12        * wtf/ASCIICType.h:
     13        (WTF::isASCIIAlphanumeric):
     14        (WTF::isASCIIHexDigit):
     15
    1162008-10-30  Kevin Lindeman  <klindeman@apple.com>
    217
  • trunk/JavaScriptCore/wtf/ASCIICType.h

    r36974 r38024  
    5252    inline bool isASCIIAlpha(int c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; }
    5353
    54     inline bool isASCIIAlphanumeric(char c) { return c >= '0' && c <= '9' || (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; }
    55     inline bool isASCIIAlphanumeric(unsigned short c) { return c >= '0' && c <= '9' || (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; }
     54    inline bool isASCIIAlphanumeric(char c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); }
     55    inline bool isASCIIAlphanumeric(unsigned short c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); }
    5656#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
    57     inline bool isASCIIAlphanumeric(wchar_t c) { return c >= '0' && c <= '9' || (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; }
     57    inline bool isASCIIAlphanumeric(wchar_t c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); }
    5858#endif
    59     inline bool isASCIIAlphanumeric(int c) { return c >= '0' && c <= '9' || (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; }
     59    inline bool isASCIIAlphanumeric(int c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); }
    6060
    6161    inline bool isASCIIDigit(char c) { return (c >= '0') & (c <= '9'); }
     
    6666    inline bool isASCIIDigit(int c) { return (c >= '0') & (c <= '9'); }
    6767
    68     inline bool isASCIIHexDigit(char c) { return c >= '0' && c <= '9' || (c | 0x20) >= 'a' && (c | 0x20) <= 'f'; }
    69     inline bool isASCIIHexDigit(unsigned short c) { return c >= '0' && c <= '9' || (c | 0x20) >= 'a' && (c | 0x20) <= 'f'; }
     68    inline bool isASCIIHexDigit(char c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); }
     69    inline bool isASCIIHexDigit(unsigned short c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); }
    7070#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
    71     inline bool isASCIIHexDigit(wchar_t c) { return c >= '0' && c <= '9' || (c | 0x20) >= 'a' && (c | 0x20) <= 'f'; }
     71    inline bool isASCIIHexDigit(wchar_t c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); }
    7272#endif
    73     inline bool isASCIIHexDigit(int c) { return c >= '0' && c <= '9' || (c | 0x20) >= 'a' && (c | 0x20) <= 'f'; }
     73    inline bool isASCIIHexDigit(int c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); }
    7474
    7575    inline bool isASCIIOctalDigit(char c) { return (c >= '0') & (c <= '7'); }
  • trunk/WebCore/ChangeLog

    r38023 r38024  
     12008-10-30  Benjamin K. Stuhl  <bks24@cornell.edu>
     2
     3        gcc 4.3.3/linux-x86 generates "suggest parentheses around && within ||"
     4        warnings; add some parentheses to disambiguate things. No functional
     5        changes, so no tests.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=21973
     8        Add parentheses to clean up some gcc warnings
     9
     10        Reviewed by Dan Bernstein.
     11
     12        * platform/graphics/Font.h:
     13        (WebCore::Font::treatAsZeroWidthSpace):
     14
    1152008-10-30  Aaron Boodman  <aa@chromium.org>
    216
  • trunk/WebCore/platform/graphics/Font.h

    r37511 r38024  
    180180#endif
    181181    static bool treatAsSpace(UChar c) { return c == ' ' || c == '\t' || c == '\n' || c == 0x00A0; }
    182     static bool treatAsZeroWidthSpace(UChar c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == 0x200e || c == 0x200f || c >= 0x202a && c <= 0x202e || c == 0xFFFC; }
     182    static bool treatAsZeroWidthSpace(UChar c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == 0x200e || c == 0x200f || (c >= 0x202a && c <= 0x202e) || c == 0xFFFC; }
    183183
    184184#if ENABLE(SVG_FONTS)
Note: See TracChangeset for help on using the changeset viewer.