6 * |mailnews/base/test/TestMsgStripRE.cpp(102) : warning C4309: 'initializing' : truncation of constant value|

VERIFIED FIXED in Thunderbird 11.0

Status

MailNews Core
Localization
VERIFIED FIXED
8 years ago
6 years ago

People

(Reporter: sgautherie, Assigned: aceman)

Tracking

(Depends on: 1 bug)

Trunk
Thunderbird 11.0
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
[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.
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

8 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

8 years ago
octal: 0303, 0206, 0303, 0230, 0303, 0205
deci.:  195,  134,  195,  152,  195,  133

Ah, actually, all need 'unsigned'!
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

8 years ago
Whiteboard: [good first bug]
(Assignee)

Comment 5

6 years ago
Created attachment 572310 [details] [diff] [review]
add "unsigned"

Added unsigned type according to the discussion. Can't say if the test works this way.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #572310 - Flags: review?(dmose)
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

6 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)
(Reporter)

Updated

6 years ago
Depends on: 659205
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)
Keywords: checkin-needed
Checked in: http://hg.mozilla.org/comm-central/rev/415929bb2436
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 11.0
(Reporter)

Updated

6 years ago
Whiteboard: [good first bug]
(Reporter)

Updated

6 years ago
Depends on: 702937
(Reporter)

Updated

6 years ago
No longer depends on: 659205
(Reporter)

Updated

6 years ago
Depends on: 632429
No longer depends on: 702937
(Assignee)

Updated

6 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.