Closed
Bug 410708
Opened 17 years ago
Closed 16 years ago
Compiler warning in nsUTF8Utils.h
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1a2
People
(Reporter: RyanVM, Assigned: sgautherie)
References
()
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
Since the landing of bug 396052, I'm seeing the following warning when compiling nsBrowserApp.cpp:
d:\mozbuild\mozilla\objdir-fx\dist\include\string\nsUTF8Utils.h(702) : warning C4309: '=' : truncation of constant value
Reporter | ||
Updated•17 years ago
|
Comment 1•17 years ago
|
||
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/xpcom/string/public/nsUTF8Utils.h&rev=1.18#618
maybe buffer_type should be unsigned char?
Assignee | ||
Comment 2•16 years ago
|
||
What I'm currently seeing on multiple files, on Win2000:
{{
../../dist/include/string\nsUTF8Utils.h(579) : warning C4309: '=' : truncation of constant value
../../dist/include/string\nsUTF8Utils.h(580) : warning C4309: '=' : truncation of constant value
../../dist/include/string\nsUTF8Utils.h(581) : warning C4309: '=' : truncation of constant value
../../dist/include/string\nsUTF8Utils.h(606) : warning C4309: '=' : truncation of constant value
../../dist/include/string\nsUTF8Utils.h(607) : warning C4309: '=' : truncation of constant value
../../dist/include/string\nsUTF8Utils.h(608) : warning C4309: '=' : truncation of constant value
../../dist/include/string\nsUTF8Utils.h(626) : warning C4309: '=' : truncation of constant value
../../dist/include/string\nsUTF8Utils.h(627) : warning C4309: '=' : truncation of constant value
../../dist/include/string\nsUTF8Utils.h(628) : warning C4309: '=' : truncation of constant value
}}
Assignee | ||
Updated•16 years ago
|
Component: XRE Startup → XPCOM
Flags: in-testsuite-
Product: Toolkit → Core
QA Contact: xre.startup → xpcom
Target Milestone: --- → mozilla1.9.1a2
Assignee | ||
Comment 3•16 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/2008072915 Minefield/3.1a2pre] (home made) (W2Ksp4)
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #331624 -
Flags: superreview?
Attachment #331624 -
Flags: review?
Assignee | ||
Updated•16 years ago
|
Attachment #331624 -
Flags: superreview?(dbaron)
Attachment #331624 -
Flags: superreview?
Attachment #331624 -
Flags: review?(dbaron)
Attachment #331624 -
Flags: review?
Comment 4•16 years ago
|
||
Comment on attachment 331624 [details] [diff] [review]
(Av1) Add explicit cast, to 'buffer_type'
>- *out++ = 0xEF;
>- *out++ = 0xBF;
>- *out++ = 0xBD;
>+ *out++ = (buffer_type) 0xEF;
>+ *out++ = (buffer_type) 0xBF;
>+ *out++ = (buffer_type) 0xBD;
If it fixes it, I'd prefer:
*out++ = '\xEF';
etc.
If not (which would surprise me), I'd prefer construction-style casts:
*out++ = buffer_type(0xEF);
etc.
Attachment #331624 -
Flags: superreview?(dbaron)
Attachment #331624 -
Flags: superreview-
Attachment #331624 -
Flags: review?(dbaron)
Attachment #331624 -
Flags: review-
Assignee | ||
Comment 5•16 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/20080809033244 Minefield/3.1a2pre] (home, optim default) (W2Ksp4)
Av1, with comment 4 suggestion(s).
Attachment #331624 -
Attachment is obsolete: true
Attachment #333051 -
Flags: superreview?(dbaron)
Attachment #333051 -
Flags: review?(dbaron)
Comment 6•16 years ago
|
||
Comment on attachment 333051 [details] [diff] [review]
(Av2) Use char notation
[Checkin: Comment 7]
r+sr=dbaron
Attachment #333051 -
Flags: superreview?(dbaron)
Attachment #333051 -
Flags: superreview+
Attachment #333051 -
Flags: review?(dbaron)
Attachment #333051 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Comment 7•16 years ago
|
||
Pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/0c93feec361e
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Attachment #333051 -
Attachment description: (Av2) Use char notation → (Av2) Use char notation
[Checkin: Comment 7]
Updated•16 years ago
|
Keywords: checkin-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•