Closed
Bug 769437
Opened 13 years ago
Closed 13 years ago
nsCSSFrameConstructor.cpp:2925:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: dholbert, Assigned: Ms2ger)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
1.88 KB,
patch
|
mounir
:
review+
|
Details | Diff | Splinter Review |
Bug 760848 introduced a build warning in nsCSSFrameConstructor.cpp
{
layout/base/nsCSSFrameConstructor.cpp:2925:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
}
by changing the variable "size" from signed to unsigned.
The comparison in question is "size" (unsigned) vs. "kNoSizeSpecified" (signed, w/ value -1) in this line of code:
> 2925 if (((1 == size || 0 == size) || (kNoSizeSpecified == size)) && (false == multipleSelect)) {
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsCSSFrameConstructor.cpp#2925
It looks like kNoSizeSpecified is _only_ used in this comparison. If we still need it, we should make it unsigned (and give it the correct (nonnegative) sentinel value), rather than -1.
| Assignee | ||
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
Comment on attachment 637806 [details] [diff] [review]
Patch v1
Review of attachment 637806 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for doing that change. I was thinking of doing it but haven't find time for it!
r=mounir
Attachment #637806 -
Flags: review?(mounir) → review+
| Assignee | ||
Comment 3•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in
before you can comment on or make changes to this bug.
Description
•