Closed
Bug 1392684
Opened 7 years ago
Closed 7 years ago
Type Qualifiers discarded after return of ObtainGit
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: tjr, Assigned: tjr)
References
Details
(Whiteboard: [tor])
Attachments
(1 file)
> /home/worker/workspace/build/src/ipc/mscom/AgileReference.cpp:138:79: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
> static IGlobalInterfaceTable * const sGit = []() -> IGlobalInterfaceTable * const {
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
Try Run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=78d7a38989b12d41c5e5a05c767d8f15a6bdc9c5
Assignee | ||
Updated•7 years ago
|
Attachment #8899900 -
Flags: review?(jld)
Comment 3•7 years ago
|
||
I don't understand what this warning is warning about — sGit is constant, yes, but forbidding any copy of the pointer value to be stored in a mutable variable seems unhelpful. (The const qualifier is on the pointer type itself, not the pointer target.)
Updated•7 years ago
|
Attachment #8899900 -
Flags: review?(jld) → review?(aklotz)
Comment 4•7 years ago
|
||
This seems harmless, but I'd rather it be looked at by someone who knows this specific code.
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8899900 [details] Bug 1392684 Remove const qualifier that gets discarded after function return in mscom::AgileReference https://reviewboard.mozilla.org/r/171230/#review176406 ::: commit-message-de25e:1 (Diff revision 1) > +Bug 1392684 Propogate const qualifier out to function return and all callers Can you please provide a more specific commit message? Adding that you're modifying mscom::AgileReference would suffice.
Attachment #8899900 -
Flags: review?(aklotz) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Jed Davis [:jld] (⏰UTC-6) from comment #3) > I don't understand what this warning is warning about — sGit is constant, > yes, but forbidding any copy of the pointer value to be stored in a mutable > variable seems unhelpful. (The const qualifier is on the pointer type > itself, not the pointer target.) Indeed, I misunderstood it. The error is saying "You're declaring this const, but nothing is going to obey that. The const is misleading and superfluous." Re-flagging :aklotz for re-review since this is a meaningful change from the original patch. New try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d22e9169052e0996db6008f5a7fa3e1c6a648bc0
Flags: needinfo?(aklotz)
Comment hidden (mozreview-request) |
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8899900 [details] Bug 1392684 Remove const qualifier that gets discarded after function return in mscom::AgileReference https://reviewboard.mozilla.org/r/171230/#review176514 ::: ipc/mscom/AgileReference.cpp:138 (Diff revision 4) > IGlobalInterfaceTable* > AgileReference::ObtainGit() > { > // Internally to COM, the Global Interface Table is a singleton, therefore we > // don't worry about holding onto this reference indefinitely. > - static IGlobalInterfaceTable * const sGit = []() -> IGlobalInterfaceTable * const { > + static IGlobalInterfaceTable * sGit = []() -> IGlobalInterfaceTable * { Nit: Remove space between IGlobalInterfaceTable and '*'
Updated•7 years ago
|
Flags: needinfo?(aklotz)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Updated•7 years ago
|
Keywords: checkin-needed
Comment 12•7 years ago
|
||
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/acae3198b087 Remove const qualifier that gets discarded after function return in mscom::AgileReference r=aklotz
![]() |
||
Comment 13•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/acae3198b087
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•