Enable MOZ_FORMAT_PRINTF in Windows builds
Categories
(Core :: General, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox102 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(13 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Using %0p raises the following error when printf annotations are enabled:
error: flag '0' results in undefined behavior with 'p' conversion specifier
Assignee | ||
Comment 4•2 years ago
|
||
Assignee | ||
Comment 5•2 years ago
|
||
Assignee | ||
Comment 6•2 years ago
|
||
Assignee | ||
Comment 7•2 years ago
|
||
Unfortunately, while with MSVC one would use the I
modifier to format
LPARAM/LONG_PTR, it doesn't work with clang-cl on 32-bits, because
LONG_PTR there is long, but I
expects an int.
Assignee | ||
Comment 8•2 years ago
|
||
Assignee | ||
Comment 9•2 years ago
|
||
Assignee | ||
Comment 10•2 years ago
|
||
With MOZ_FORMAT_PRINTF annotations, the compiler expects a wchar_t*, and
it won't automatically consider char16ptr_t to be compatible with that.
While handling strings, there's one case of formatting that doesn't need
to use %S at all.
Assignee | ||
Comment 11•2 years ago
|
||
Assignee | ||
Comment 12•2 years ago
|
||
- Missing/Extra formatting directives
- Typos in formatting directives
- Non-literal strings used as formatting strings
- Wrong types passed as argument
- Swapped arguments
- Commas between parts of unique formatting strings
Assignee | ||
Comment 13•2 years ago
|
||
clang-cl doesn't define GNUC. Also for some reason, clang-cl doesn't
like the use of MOZ_FORMAT_PRINTF on a function definition (while clang
is apparently happy with it).
Comment 14•2 years ago
|
||
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/a6ecfc4bb04e clang-format the files we're about to touch. r=andi https://hg.mozilla.org/integration/autoland/rev/d5c6d85c4bac Adapt formatting to the difference in ProcessId type across platforms. r=nika,necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/e8da2626eb78 Replace %0p with %p. r=nika https://hg.mozilla.org/integration/autoland/rev/9a91f6d0586e Use %p for pointer types. r=gfx-reviewers,rkraesig,nika,jrmuizel https://hg.mozilla.org/integration/autoland/rev/7e166ba7f2a8 Use %lu for Windows Error types (DWORD). r=rkraesig,xpcom-reviewers,application-update-reviewers,mhowell,bobowen,necko-reviewers,keeler,media-playback-reviewers,bytesized,barret,alwu,kershaw https://hg.mozilla.org/integration/autoland/rev/6395d8b4c146 Add missing l modifier for HRESULT formatting. r=media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,rkraesig,alwu,kershaw https://hg.mozilla.org/integration/autoland/rev/d544976715e1 Use proper formatting directives for LPARAM and WPARAM. r=Jamie,rkraesig https://hg.mozilla.org/integration/autoland/rev/1f8659bc50a2 Add missing l modifier for long formatting. r=Jamie,media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,gerald,application-update-reviewers,bytesized,alwu,kershaw https://hg.mozilla.org/integration/autoland/rev/ecf8a55ccad1 Add missing z modifier for size_t formatting. r=gfx-reviewers,necko-reviewers,keeler,rkraesig,kershaw https://hg.mozilla.org/integration/autoland/rev/b8a9e8c33b90 Adjust UTF-16 string formatting. r=nika https://hg.mozilla.org/integration/autoland/rev/667cc7160e4a Use proper formatting directives in various places. r=gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,bytesized,kershaw https://hg.mozilla.org/integration/autoland/rev/50248597686a Fix various formatting errors. r=media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,rkraesig,alwu,padenot,kershaw https://hg.mozilla.org/integration/autoland/rev/803df6c16113 Enable MOZ_FORMAT_PRINTF on all clang builds. r=nika
Comment 15•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a6ecfc4bb04e
https://hg.mozilla.org/mozilla-central/rev/d5c6d85c4bac
https://hg.mozilla.org/mozilla-central/rev/e8da2626eb78
https://hg.mozilla.org/mozilla-central/rev/9a91f6d0586e
https://hg.mozilla.org/mozilla-central/rev/7e166ba7f2a8
https://hg.mozilla.org/mozilla-central/rev/6395d8b4c146
https://hg.mozilla.org/mozilla-central/rev/d544976715e1
https://hg.mozilla.org/mozilla-central/rev/1f8659bc50a2
https://hg.mozilla.org/mozilla-central/rev/ecf8a55ccad1
https://hg.mozilla.org/mozilla-central/rev/b8a9e8c33b90
https://hg.mozilla.org/mozilla-central/rev/667cc7160e4a
https://hg.mozilla.org/mozilla-central/rev/50248597686a
https://hg.mozilla.org/mozilla-central/rev/803df6c16113
Description
•