[Webkit-unassigned] [Bug 170098] New: sscanf and stderr used without including cstdio

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 25 06:21:21 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=170098

            Bug ID: 170098
           Summary: sscanf and stderr used without including cstdio
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: lantw44 at gmail.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170325/13b361eb/attachment.html>


More information about the webkit-unassigned mailing list