Closed
Bug 488971
Opened 15 years ago
Closed 13 years ago
6 * |mailnews/base/test/TestMsgStripRE.cpp(102) : warning C4309: 'initializing' : truncation of constant value|
Categories
(MailNews Core :: Localization, defect)
MailNews Core
Localization
Tracking
(Not tracked)
VERIFIED
FIXED
Thunderbird 11.0
People
(Reporter: sgautherie, Assigned: aceman)
References
Details
Attachments
(1 file)
1.32 KB,
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090417 SeaMonkey/2.0b1pre] (experimental/_m-c_, home, optim default) (W2Ksp4) (http://hg.mozilla.org/mozilla-central/rev/9e06217fc471 +http://hg.mozilla.org/comm-central/rev/...) Code is { static const char utf8Prefixes[] = {'S', 'V', ',', 0303, 0206, 0303, 0230, 0303, 0205, '\0'}; } in which (I think): *|02xx| would need 'unsigned'. *|0303| just can't fit anyway.
Comment 1•15 years ago
|
||
Constants that start with the number 0 are supposed to be interpreted by the compiler as octal, not decimal, so I would expect those all to fit. Can you paste the complete warning message with context into the bug? What version of what compiler is this?
Reporter | ||
Comment 2•15 years ago
|
||
(In reply to comment #1) > Constants that start with the number 0 are supposed to be interpreted by the > compiler as octal, not decimal, so I would expect those all to fit. Oh, yet... (octal: why not use hexa or decimal?) > Can you paste the complete warning message with context into the bug? > What version of what compiler is this? Linux: http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1240223862.1240227669.17537.gz&fulltext=1 MacOSX: (no warnings) http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1240016749.1240023373.12834.gz&fulltext=1 Windows: http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1239921058.1239928583.20321.gz&fulltext=1
Reporter | ||
Comment 3•15 years ago
|
||
octal: 0303, 0206, 0303, 0230, 0303, 0205 deci.: 195, 134, 195, 152, 195, 133 Ah, actually, all need 'unsigned'!
Comment 4•15 years ago
|
||
I think I used octal because I generated that string using some utility (od, maybe) that give it to me that way by default. Good catch on the unsigned piece; whoops!
Updated•15 years ago
|
Whiteboard: [good first bug]
Added unsigned type according to the discussion. Can't say if the test works this way.
Comment 6•13 years ago
|
||
Comment on attachment 572310 [details] [diff] [review] add "unsigned" Dmose isn't active in mailnews anymore swithcing the review to Mark.
Attachment #572310 -
Flags: review?(dmose) → review?(mbanner)
Reporter | ||
Comment 7•13 years ago
|
||
Comment on attachment 572310 [details] [diff] [review] add "unsigned" While there, why not switch from octal to (more common) hexa or decimal? (In reply to :aceman from comment #5) > Can't say if the test works this way. Bug 659205 comment 12 removed this test (and 3 other ones) from build. I'm not sure what the plan was/is w.r.t. these files (in the repository).
Attachment #572310 -
Flags: feedback?(iann_bugzilla)
Comment 8•13 years ago
|
||
Comment on attachment 572310 [details] [diff] [review] add "unsigned" Ok, via a bit of makefile hacking I was able to get it to at least try to compile even if it didn't link. That was enough to prove the warnings go away, and will improve this if we're able to get it going in future. Re octal & others: octal is quite standard format and gets used frequently. I don't think we need to change it here.
Attachment #572310 -
Flags: review?(mbanner)
Attachment #572310 -
Flags: review+
Attachment #572310 -
Flags: feedback?(iann_bugzilla)
Updated•13 years ago
|
Keywords: checkin-needed
Comment 9•13 years ago
|
||
Checked in: http://hg.mozilla.org/comm-central/rev/415929bb2436
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 11.0
Reporter | ||
Updated•13 years ago
|
Whiteboard: [good first bug]
Reporter | ||
Updated•13 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•