Changeset 38024 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 30, 2008, 10:36:06 PM (17 years ago)
Author:
[email protected]
Message:

Add parentheses to fix some gcc warnings.

JavaScriptCore:

2008-10-30 Benjamin K. Stuhl <[email protected]>

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 <[email protected]>

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/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r38022 r38024  
     12008-10-30  Benjamin K. Stuhl  <[email protected]>
     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  <[email protected]>
    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'); }
Note: See TracChangeset for help on using the changeset viewer.