On Tue, Dec 14, 2010 at 10:42 PM, pikpik <[email protected]> wrote:
> - PrintF seems to want an argument be an "unsigned int" while several > parts of V8 are passing variations of "int's." > ...src/deoptimizer.cc:780: error: format '%08x' expects type 'unsigned > int', but argument 3 has type 'int32_t' > src/deoptimizer.cc:785: error: format '%08x' expects type 'unsigned > int', but argument 3 has type 'int32_t > In the off chance that the v8 devs don't know this, <inttypes.h> (from C99) defines standard printf and scantf format specifiers for the core numeric types, e.g. printf( "%"PRIi32"\n", myInt32); Since i learned about those, all of my printf/scanf uses them, and my headaches with the above warnings went away. For my libraries which specify their own fixed-size number types, e.g. typedef uint32_t mylib_id_t; i also add: #define MYLIB_ID_T_PFMT PRIu32 #define MYLIB_ID_T_SFMT SCNu32 -- ----- stephan beal http://wanderinghorse.net/home/stephan/ -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
