Closed
Bug 924749
Opened 11 years ago
Closed 11 years ago
Signed/unsigned comparison build warnings PathCairo.cpp
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
1.33 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
1.41 KB,
patch
|
Details | Diff | Splinter Review |
Three build warnings in PathCairo.cpp: { gfx/2d/PathCairo.cpp:273:31 [-Wsign-compare] comparison between signed and unsigned integer expressions gfx/2d/PathCairo.cpp:277:27 [-Wsign-compare] comparison between signed and unsigned integer expressions gfx/2d/PathCairo.cpp:287:40 [-Wsign-compare] comparison between signed and unsigned integer expressions }
Assignee | ||
Comment 1•11 years ago
|
||
The first and third loop variables are compared against vector::size(), which returns vector<foo>::size_type; the second loop var is compared against 'uint32_t pointCount', so I made that one a uint32_t. So I changed the loop vars' types to match.
Assignee | ||
Comment 2•11 years ago
|
||
oops; forgot to qref. That first patch used size_t instead of the more-pedantically-correct std::vector<cairo_path_data_t>::size_type (which this version uses) (I'm happy with either; feel free to reject this and r+ the other patch if you'd prefer the concise version)
Attachment #814718 -
Attachment is obsolete: true
Attachment #814718 -
Flags: review?(jmuizelaar)
Attachment #814719 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 814719 [details] [diff] [review] fix v2 (using std::vector<cairo_path_data_t>::size_type) [Nope, this is too ugly] Actually, looks like Jeff's on vacation. Bas, could you review? (If you're put off by the vector<...>::size_type cruft, see other patch for a prettier size_t version)
Attachment #814719 -
Flags: review?(jmuizelaar) → review?(bas)
Comment 4•11 years ago
|
||
Comment on attachment 814718 [details] [diff] [review] fix v1 Review of attachment 814718 [details] [diff] [review]: ----------------------------------------------------------------- I sadly have to admit I prefer this even though it's strictly a tiny bit less correct :).
Attachment #814718 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Attachment #814718 -
Attachment is obsolete: false
Assignee | ||
Comment 5•11 years ago
|
||
Thanks! (I prefer size_t, too; and IIRC, it's guaranteed to be equivalent as long as we're not instantiating vector<> with a custom allocator)
Assignee | ||
Updated•11 years ago
|
Attachment #814719 -
Attachment description: fix v2 (using std::vector<cairo_path_data_t>::size_type) → fix v2 (using std::vector<cairo_path_data_t>::size_type) [Nope, this is too ugly]
Attachment #814719 -
Flags: review?(bas)
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4c3caf8f741
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/b4c3caf8f741
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•