Closed Bug 446320 Opened 12 years ago Closed 12 years ago
SM: fixing -Wformat warnings
On 64-bit Linux with a debug build when using -Wformat option to GCC (browser build) the compiler generates a few warnings like: warning: format ‘%3u’ expects type ‘unsigned int’, but argument 3 has type ‘long int’ The warnings are real bugs in the debug code and should be fixed.
Most of the warnings comes from using ptrdiff_t as the type for the jump offset while using %d as a format specifier. I guess an alternative is to fix the code to use just int, not ptrdiff_t, as the perspective of supporting jumps spanning over 2GB of script bytecode is few years off. But adding casts is a safer alternative.
In the version v1 I cast off to uintN, not the proper intN, in js_Disassemble1.
Attachment #330497 - Flags: review?(brendan) → review?(crowder)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.