WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
170098
sscanf and stderr used without including cstdio
https://bugs.webkit.org/show_bug.cgi?id=170098
Summary
sscanf and stderr used without including cstdio
Ting-Wei Lan
Reported
2017-03-25 06:21:21 PDT
This causes compilation error on FreeBSD: /path/to/WebKit/Source/WTF/wtf/NumberOfCores.cpp:53:13: error: use of undeclared identifier 'sscanf'; did you mean 'vswscanf'? if (sscanf(coresEnv, "%u", &numberOfCores) == 1) { ^~~~~~ vswscanf /usr/include/wchar.h:192:5: note: 'vswscanf' declared here int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, ^ /path/to/WebKit/Source/WTF/wtf/NumberOfCores.cpp:53:20: error: cannot initialize a parameter of type 'const wchar_t *' with an lvalue of type 'const char *' if (sscanf(coresEnv, "%u", &numberOfCores) == 1) { ^~~~~~~~ /usr/include/wchar.h:192:40: note: passing argument to parameter here int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, ^ /path/to/WebKit/Source/WTF/wtf/NumberOfCores.cpp:57:21: error: use of undeclared identifier 'stderr' fprintf(stderr, "WARNING: failed to parse WTF_numberOfProcessorCores=%s\n", coresEnv); ^ 2 warnings and 3 errors generated.
Attachments
Patch
(1.03 KB, patch)
2017-03-25 06:23 PDT
,
Ting-Wei Lan
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ting-Wei Lan
Comment 1
2017-03-25 06:23:27 PDT
Created
attachment 305376
[details]
Patch
WebKit Commit Bot
Comment 2
2017-04-07 12:04:03 PDT
Comment on
attachment 305376
[details]
Patch Clearing flags on attachment: 305376 Committed
r215107
: <
http://trac.webkit.org/changeset/215107
>
WebKit Commit Bot
Comment 3
2017-04-07 12:04:04 PDT
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