Closed
Bug 1334286
Opened 8 years ago
Closed 8 years ago
use MOZ_FORMAT_PRINTF in DMD
Categories
(Core :: DMD, defect)
Core
DMD
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: tromey, Assigned: tromey)
References
Details
Attachments
(1 file)
Auditing printf-likes in bug 1060419 revealed that DMD could use
MOZ_FORMAT_PRINTF in a few spots, namely the various implementations
of StatusMsg.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ttromey
Assignee | ||
Comment 2•8 years ago
|
||
IIUC to run this in try I have to also add a patch to update some moz config files.
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8862053 [details]
Bug 1334286 - use MOZ_FORMAT_PRINTF in DMD;
https://reviewboard.mozilla.org/r/134006/#review137014
::: memory/replace/dmd/DMD.h:53
(Diff revision 1)
>
> virtual void Analyze(UniquePtr<JSONWriteFunc>);
>
> virtual void SizeOf(Sizes*);
>
> - virtual void StatusMsg(const char*, va_list);
> + virtual void StatusMsg(const char*, va_list) MOZ_FORMAT_PRINTF(2, 0);
Is 0 the second arg here because it takes a va_list instead of ...? The docs in mfbt/Attributes.h don't mention that case.
Attachment #8862053 -
Flags: review?(n.nethercote) → review+
Comment 4•8 years ago
|
||
(In reply to Tom Tromey :tromey from comment #2)
> IIUC to run this in try I have to also add a patch to update some moz config
> files.
You're in luck. DMD is enabled for debug builds on TreeHerder -- there is even an xpcshelltest -- so you won't have to do that.
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #3)
> > + virtual void StatusMsg(const char*, va_list) MOZ_FORMAT_PRINTF(2, 0);
>
> Is 0 the second arg here because it takes a va_list instead of ...?
Yes. See also bug 1334279.
This is part of GCC's definition of the attribute.
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c090ad2183e
use MOZ_FORMAT_PRINTF in DMD; r=njn
Comment 7•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•