Closed Bug 1334279 Opened 3 years ago Closed 3 years ago

vsprintf analogues should use MOZ_FORMAT_PRINTF

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: tromey, Assigned: tromey)

References

Details

Attachments

(1 file)

Bug 1060419 adds MOZ_FORMAT_PRINTF in many places.
However, it did not touch vsprintf-like functions.
These can be marked with MOZ_FORMAT_PRINTF(N, 0); in this case
the compiler will do some minimal checking of the format string.
Any eventual patch here should also update Attributes.h to mention the meaning of the "0".
Assignee: nobody → ttromey
Comment on attachment 8864613 [details]
Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF;

https://reviewboard.mozilla.org/r/136290/#review139370

I guess "consistency" is "didn't use really weird format sequences"?  The docs are pretty vague.
Attachment #8864613 - Flags: review?(nfroyd) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 3afc06d748e3 -d 95211a496191: rebasing 394064:3afc06d748e3 "Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj" (tip)
merging js/src/jit/MIRGenerator.h
merging js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h
merging xpcom/string/nsTSubstring.h
warning: conflicts while merging js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Rebased.
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ce8c07e3e29
mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj
https://hg.mozilla.org/mozilla-central/rev/8ce8c07e3e29
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.