Closed
Bug 925195
Opened 8 years ago
Closed 8 years ago
ImageBridgeParent.cpp:201:30: warning: comparison of integers of different signs [-Wsign-compare]
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla27
Tracking | Status | |
---|---|---|
firefox26 | --- | unaffected |
firefox27 | --- | fixed |
People
(Reporter: keeler, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-])
Attachments
(1 file)
2.14 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
9:53.41 /home/keeler/mozilla-central/gfx/layers/ipc/ImageBridgeParent.cpp:201:30: warning: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int' [-Wsign-compare] 9:53.41 if (aFds[i].protocolId() == (int)GetProtocolId()) {
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → cpeterson
Blocks: buildwarning, Nuwa
Severity: normal → minor
Status: NEW → ASSIGNED
status-firefox26:
--- → unaffected
status-firefox27:
--- → affected
Assignee | ||
Comment 1•8 years ago
|
||
The ImageBridgeParent::CloneToplevel() function cast GetProtocolId()'s IPCMessageStart enum return value to int, but compared it to an uint32_t. Other uses of GetProtocolId() cast its return value to (just) `unsigned`: https://mxr.mozilla.org/mozilla-central/search?string=%29getProtocolId%28%29
Attachment #818831 -
Flags: review?(bent.mozilla)
Comment on attachment 818831 [details] [diff] [review] fix-warning.patch Review of attachment 818831 [details] [diff] [review]: ----------------------------------------------------------------- r=me, thanks! ::: gfx/layers/ipc/ImageBridgeParent.cpp @@ +194,5 @@ > base::ProcessHandle aPeerProcess, > mozilla::ipc::ProtocolCloneContext* aCtx) > { > for (unsigned int i = 0; i < aFds.Length(); i++) { > + if (aFds[i].protocolId() == (unsigned)GetProtocolId()) { Can you use C++-style constructor here? E.g.: | == unsigned(GetProtocolId())|
Attachment #818831 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 3•8 years ago
|
||
Landed on mozilla-inbound with the changes suggested in comment 2: https://hg.mozilla.org/integration/mozilla-inbound/rev/fec466b50c14
Comment 4•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fec466b50c14
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Updated•7 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•