WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
165650
Fix string specification in print format
https://bugs.webkit.org/show_bug.cgi?id=165650
Summary
Fix string specification in print format
Keith Rollin
Reported
2016-12-08 21:49:23 PST
As Alex noted in
Bug 164527, Comment 40
, the string specifications in format strings are not standard and don't build with non-Cocoa SDKs or even with Cocoa SDKs that are not recent enough.
Attachments
Patch
(28.67 KB, patch)
2016-12-08 22:59 PST
,
Keith Rollin
no flags
Details
Formatted Diff
Diff
Patch
(28.40 KB, patch)
2016-12-09 11:32 PST
,
Keith Rollin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Keith Rollin
Comment 1
2016-12-08 22:59:24 PST
Created
attachment 296645
[details]
Patch
Keith Rollin
Comment 2
2016-12-08 23:03:21 PST
I thought about using "PRIs" instead of "STRING_SPECIFICATION" (as an analog to "PRId8", et al), but wasn't sure everyone would get the reference. Also, I've been encouraged by multiple parties to spell out my symbol names, so I went with "STRING_SPECIFICATION". But if there's support for "PRIs" (or perhaps "PRIsPUBLIC"), I could use that instead.
Alex Christensen
Comment 3
2016-12-09 00:20:22 PST
Comment on
attachment 296645
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=296645&action=review
We do use a lot of PRI* in places like NetworkCacheStatistics.cpp, but PRIs isn't standardized and I think this is indeed better.
> Source/WebKit2/NetworkProcess/capture/NetworkCaptureLogging.h:46 > +#define DEBUG_LOG(format, ...) RELEASE_LOG(Network, "#PLT: %p - " STRING_SPECIFICATION "::" STRING_SPECIFICATION ": " format, this, DEBUG_LOG_EXPAND_AND_QUOTE(DEBUG_CLASS), __FUNCTION__, ##__VA_ARGS__)
http://www.cplusplus.com/reference/cstdio/printf/
calls this a "specifier" not a "specification". Let's call them specifiers. If they're called specifications somewhere I'm not familiar with, that's ok, too.
Keith Rollin
Comment 4
2016-12-09 11:32:35 PST
Created
attachment 296664
[details]
Patch
WebKit Commit Bot
Comment 5
2016-12-09 13:59:51 PST
Comment on
attachment 296664
[details]
Patch Clearing flags on attachment: 296664 Committed
r209625
: <
http://trac.webkit.org/changeset/209625
>
WebKit Commit Bot
Comment 6
2016-12-09 13:59:55 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug