IS_CJ_CHAR should not return true for u > 0xFFEF

RESOLVED FIXED

Status

()

Core
Internationalization
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

Trunk
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

14 years ago
/Users/timeless/mozilla/content/base/src/nsPlainTextSerializer.cpp:
 In member function `void nsPlainTextSerializer::Write(const nsAString&)':
1761: warning: comparison is always true due to limited range of data type
1761: warning: comparison is always true due to limited range of data type
The problem is the last test in the IS_CJ_CHAR macro:

http://lxr.mozilla.org/seamonkey/source/intl/unicharutil/util/nsUnicharUtils.h#94

Don't we have a bug on that already?  This would be a dup.
Whiteboard: DUPEME
I don't think it's a dupe (of bug 223707), because there are two, count 'em, two
versions of the macro, IS_CJ_CHAR and IS_CJK_CHAR. The difference is deliberate:
IS_CJ_CHAR doesn't include Korean characters.

In any case all these macros (and probably their callers) need updating to
Unicode 4.0, but I suggest you just correct the warning for now as in bug 223707.
(Assignee)

Comment 3

14 years ago
Created attachment 134403 [details] [diff] [review]
change the limit from 0xFFFF to 0xFFEF
(Assignee)

Comment 4

14 years ago
.
Assignee: dom-to-text → timeless
Component: DOM to Text Conversion → Internationalization
QA Contact: amyy
Summary: warning: comparison is always true due to limited range of data type in member function `void nsPlainTextSerializer::Write(const nsAString&)' → IS_CJ_CHAR should not return true for u > 0xFFEF
Whiteboard: DUPEME
(Assignee)

Updated

14 years ago
Attachment #134403 - Flags: superreview?(tor)
Attachment #134403 - Flags: review?(smontagu)
Comment on attachment 134403 [details] [diff] [review]
change the limit from 0xFFFF to 0xFFEF

r=smontagu
Attachment #134403 - Flags: review?(smontagu) → review+
(Assignee)

Updated

14 years ago
Attachment #134403 - Flags: superreview?(tor) → superreview?(roc)
Attachment #134403 - Flags: superreview?(roc) → superreview+
(Assignee)

Comment 6

14 years ago
checked in
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.