Closed Bug 410708 Opened 17 years ago Closed 16 years ago

Compiler warning in nsUTF8Utils.h

Categories

(Core :: XPCOM, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9.1a2

People

(Reporter: RyanVM, Assigned: sgautherie)

References

()

Details

Attachments

(1 file, 1 obsolete file)

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
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 }}
Component: XRE Startup → XPCOM
Flags: in-testsuite-
Product: Toolkit → Core
QA Contact: xre.startup → xpcom
Target Milestone: --- → mozilla1.9.1a2
[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?
Attachment #331624 - Flags: superreview?(dbaron)
Attachment #331624 - Flags: superreview?
Attachment #331624 - Flags: review?(dbaron)
Attachment #331624 - Flags: review?
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-
[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 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+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Attachment #333051 - Attachment description: (Av2) Use char notation → (Av2) Use char notation [Checkin: Comment 7]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: