Closed
Bug 1202965
Opened 9 years ago
Closed 9 years ago
Add MOZ_UNUSED
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(2 files)
(deleted),
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
mozilla::unused is nice but can't be used in (a) C code, and (b) C++ code where linking with unused.o is tricky.
Therefore a fallback macro MOZ_UNUSED will be useful. I already have several places where it will be useful.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8658508 -
Flags: review?(nfroyd)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8658509 -
Flags: review?(mh+mozilla)
Updated•9 years ago
|
Attachment #8658509 -
Flags: review?(mh+mozilla) → review+
Comment 3•9 years ago
|
||
With all the back and forth on that file, we might as well have fixed it to use write's return value.
Comment 4•9 years ago
|
||
Comment on attachment 8658508 [details] [diff] [review]
(part 1) - Add MOZ_UNUSED
Review of attachment 8658508 [details] [diff] [review]:
-----------------------------------------------------------------
::: mfbt/unused.h
@@ +34,5 @@
> +#endif // __cplusplus
> +
> +// An alternative to mozilla::unused for use in (a) C code and (b) code where
> +// linking with unused.o is difficult.
> +#define MOZ_UNUSED(expr) \
I almost want to hide this thusly:
#ifdef MOZ_MOZILLA_UNUSED_DOESNT_WORK_HERE
#define MOZ_UNUSED(expr) ...
#undef MOZ_MOZILLA_UNUSED_DOESNT_WORK_HERE
#endif
(only half joking here).
Attachment #8658508 -
Flags: review?(nfroyd) → review+
Comment 6•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4805fa9a89fe
https://hg.mozilla.org/mozilla-central/rev/7a715b603ac0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Updated•5 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•