WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
191416
[Win] UDis86Disassembler.cpp: warning: format specifies type 'unsigned long' but the argument has type 'uintptr_t' (aka 'unsigned long long')
https://bugs.webkit.org/show_bug.cgi?id=191416
Summary
[Win] UDis86Disassembler.cpp: warning: format specifies type 'unsigned long' ...
Fujii Hironori
Reported
2018-11-08 00:24:02 PST
[Win] UDis86Disassembler.cpp: warning: format specifies type 'unsigned long' but the argument has type 'uintptr_t' (aka 'unsigned long long') MSVC reports following compilation warning:
> c:\webkit\ga\source\javascriptcore\disassembler\udis86disassembler.cpp(52): warning C4477: 'snprintf' : format string '%lx' requires an argument of type 'unsigned long', but variadic argument 1 has type 'uintptr_t' (compiling source file C:\webkit\ga\WebKitBuild\Debug\DerivedSources\JavaScriptCore\unified-sources\UnifiedSource55.cpp) > c:\webkit\ga\source\javascriptcore\disassembler\udis86disassembler.cpp(52): note: consider using '%llx' in the format string (compiling source file C:\webkit\ga\WebKitBuild\Debug\DerivedSources\JavaScriptCore\unified-sources\UnifiedSource55.cpp) > c:\webkit\ga\source\javascriptcore\disassembler\udis86disassembler.cpp(52): note: consider using '%Ix' in the format string (compiling source file C:\webkit\ga\WebKitBuild\Debug\DerivedSources\JavaScriptCore\unified-sources\UnifiedSource55.cpp) > c:\webkit\ga\source\javascriptcore\disassembler\udis86disassembler.cpp(52): note: consider using '%I64x' in the format string (compiling source file C:\webkit\ga\WebKitBuild\Debug\DerivedSources\JavaScriptCore\unified-sources\UnifiedSource55.cpp)
Clang-cl reports following compilation warning:
> In file included from DerivedSources\JavaScriptCore\unified-sources\UnifiedSource55.cpp:4: > ..\..\Source\JavaScriptCore\disassembler/UDis86Disassembler.cpp(52,55): warning: format specifies type 'unsigned long' but the argument has type 'uintptr_t' (aka 'unsigned long long') [-Wformat] > snprintf(pcString, sizeof(pcString), "0x%lx", static_cast<uintptr_t>(currentPC)); > ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > %llx > 1 warning generated.
This code has been introduced in
Bug 190273
.
Attachments
Patch
(1.68 KB, patch)
2018-11-08 01:18 PST
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2018-11-08 01:18:02 PST
Created
attachment 354218
[details]
Patch
Fujii Hironori
Comment 2
2018-11-08 17:30:43 PST
Comment on
attachment 354218
[details]
Patch Clearing flags on attachment: 354218 Committed
r238011
: <
https://trac.webkit.org/changeset/238011
>
Fujii Hironori
Comment 3
2018-11-08 17:30:46 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4
2018-11-08 17:31:38 PST
<
rdar://problem/45930615
>
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