[Webkit-unassigned] [Bug 126352] New: JSC disassembler warns about incorrect printf format on 64-bit Linux
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 31 14:58:45 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=126352
Summary: JSC disassembler warns about incorrect printf format
on 64-bit Linux
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Minor
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: b.long at cablelabs.com
In A64DOpcode.h, we use '%llx' for uint64_t's. On 64-bit Linux, uint64_t is a long unsigned, not a long long unsigned. This may occur on other platforms.
I'm not sure if this actually matters, but I'm trying to get rid of build warnings in WebKitGTK.
The PRIx64 macro should expand to the correct format for each platform. I think it doesn't work on Visual Studio, but it's defined in Source/JavaScriptCore/os-win32/inttypes.h. I'm hoping the build will automatically pick that up, but I can add a special import for it if necessary.
Build output:
CXX Source/JavaScriptCore/disassembler/libjavascriptcoregtk_3_0_la-ARM64Disassembler.lo
In file included from ../../Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.cpp:27:0:
../../Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h: In member function 'void JSC::ARM64Disassembler::A64DOpcode::appendUnsignedImmediate64(uint64_t)':
../../Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h:175:42: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t {aka long unsigned int}' [-Werror=format=]
bufferPrintf("#0x%llx", immediate);
^
../../Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h: In member function 'void JSC::ARM64Disassembler::A64DOpcode::appendPCRelativeOffset(uint32_t*, int32_t)':
../../Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h:180:74: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t {aka long unsigned int}' [-Werror=format=]
bufferPrintf("0x%llx", reinterpret_cast<uint64_t>(pc + immediate));
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list