Closed
Bug 1219392
Opened 9 years ago
Closed 9 years ago
Capitalize mozilla::unused to avoid conflicts
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: poiru, Assigned: poiru)
References
Details
Attachments
(1 file)
176.26 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
The tree has a bunch of identifiers named `unused` that conflict with `mozilla::unused`. The easiest way out is to switch to `mozilla::Unused`. Note that the patch intentionally has no context.
Attachment #8680148 -
Flags: review?(nfroyd)
Comment 1•9 years ago
|
||
Ongoing shout-out to fix compilers that don't like cast-to-void as a way to use return values! (I am not suggesting or requiring you do this, just that mozilla::unused is stupid practice IMO. :-) )
Comment 2•9 years ago
|
||
(In reply to Birunthan Mohanathas [:poiru] from comment #0) > The tree has a bunch of identifiers named `unused` that conflict with > `mozilla::unused`. The easiest way out is to switch to `mozilla::Unused`. My impression was that this was only an issue with the Chromium-imported ipc code. Where are the other problems?
Flags: needinfo?(birunthan)
Comment 3•9 years ago
|
||
I actually did write a patch not to long ago to eliminate the places people call things 'unused', though Nathan suggested another work around. It wasn't too bad. But of course, people are going to keep adding them.
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #2) > (In reply to Birunthan Mohanathas [:poiru] from comment #0) > > The tree has a bunch of identifiers named `unused` that conflict with > > `mozilla::unused`. The easiest way out is to switch to `mozilla::Unused`. > > My impression was that this was only an issue with the Chromium-imported ipc > code. Where are the other problems? See https://dxr.mozilla.org/mozilla-central/search?q=ext%3Acpp+regexp%3A\bunused[^\.][^%3C]\b&redirect=false&case=true Many of those are comments, but there are still a few actual hits.
Flags: needinfo?(birunthan)
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Birunthan Mohanathas [:poiru] from comment #4) > See > https://dxr.mozilla.org/mozilla-central/ > search?q=ext%3Acpp+regexp%3A\bunused[^\.][^%3C]\b&redirect=false&case=true > > Many of those are comments, but there are still a few actual hits. I forgot that DXR is smart. This is a far better search: https://dxr.mozilla.org/mozilla-central/search?q=ext%3Acpp+id%3Aunused&redirect=true&case=true
Comment 6•9 years ago
|
||
Comment on attachment 8680148 [details] [diff] [review] Capitalize mozilla::unused to avoid conflicts Review of attachment 8680148 [details] [diff] [review]: ----------------------------------------------------------------- Maybe we should call it "bitbucket" instead. ;) But yeah, the second DXR query and the since of this patch are a little more convincing.
Attachment #8680148 -
Flags: review?(nfroyd) → review+
Comment 8•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7ec70e0c6997
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 9•9 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/7ec70e0c6997
status-b2g-v2.5:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•