Closed
Bug 624410
Opened 14 years ago
Closed 14 years ago
nsReadableUtils.cpp:577:38: warning: suggest parentheses around ‘&&’ within ‘||’
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
(Whiteboard: [build_warning])
Attachments
(1 file)
1.50 KB,
patch
|
dwitte
:
review+
|
Details | Diff | Splinter Review |
Filing bug on this warning-spam: > xpcom/string/src/nsReadableUtils.cpp: In function ‘PRBool IsUTF8(const nsACString_internal&)’: > xpcom/string/src/nsReadableUtils.cpp:577:38: warning: suggest parentheses around ‘&&’ within ‘||’ > xpcom/string/src/nsReadableUtils.cpp:578:50: warning: suggest parentheses around ‘&&’ within ‘||’ > xpcom/string/src/nsReadableUtils.cpp:581:62: warning: suggest parentheses around ‘&&’ within ‘||’ > xpcom/string/src/nsReadableUtils.cpp:582:42: warning: suggest parentheses around ‘&&’ within ‘||’ > xpcom/string/src/nsReadableUtils.cpp:582:59: warning: suggest parentheses around ‘&&’ within ‘||’ The chunk of code flagged is: > 575 // non-character : EF BF [BE-BF] or F[0-7] [89AB]F BF [BE-BF] > 576 if ( nonchar && ( !state && c < 0xBE || > 577 state == 1 && c != 0xBF || > 578 state == 2 && 0x0F != (0x0F & c) )) > 579 nonchar = PR_FALSE; > 580 > 581 if ( !UTF8traits::isInSeq(c) || overlong && c <= olupper || > 582 surrogate && slower <= c || nonchar && !state ) > 583 return PR_FALSE; // Not UTF-8 string > 584 overlong = surrogate = PR_FALSE; http://mxr.mozilla.org/mozilla-central/source/xpcom/string/src/nsReadableUtils.cpp
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Attachment #502522 -
Attachment description: fix → fix: add parens around && (and some newlines)
Comment 2•14 years ago
|
||
Comment on attachment 502522 [details] [diff] [review] fix: add parens around && (and some newlines) r=dwitte
Attachment #502522 -
Flags: review?(dwitte) → review+
Assignee | ||
Comment 3•14 years ago
|
||
(not requesting approval -- deferring this patch to post-Gecko-2.0)
Whiteboard: [build_warning] → [build_warning][needs landing post-2.0]
Assignee | ||
Updated•14 years ago
|
Hardware: x86_64 → All
Whiteboard: [build_warning][needs landing post-2.0] → [build_warning][needs landing post-gecko2.0]
Assignee | ||
Comment 4•14 years ago
|
||
Landed: http://hg.mozilla.org/mozilla-central/rev/8fdd8b2b6b69
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [build_warning][needs landing post-gecko2.0] → [build_warning]
You need to log in
before you can comment on or make changes to this bug.
Description
•