[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fixed format specifier width mismatch
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: [PATCH] Fixed format specifier width mismatch
- From: Joseph Ates <joey@xxxxxxxxxxxxxx>
- Date: Tue, 22 Dec 2015 04:28:27 -0500 (EST)
- To: Lukas Slebodnik <lslebodn@xxxxxxxxxx>
- Cc: cmocka@xxxxxxxxxxxxxx
On Mon, 21 Dec 2015, Lukas Slebodnik wrote: > On (20/12/15 16:29), Joseph Ates wrote: > >+# define LargestIntegralTypePrintfFormatDecimal "%I64u" > character "%" is usually not part of format string macros > > @see standard header file inttypes.h > (or manual page) The patch attempts to match the current format specifiers for the macro LargestIntegralTypePrintfFormat which cannot be represented without the "%" character on WIN32. For WIN32, LargestIntegralTypePrintfFormat is defined as: # define LargestIntegralTypePrintfFormat "0x%I64x" However on other platforms it is defined as: # if __WORDSIZE == 64 # define LargestIntegralTypePrintfFormat "%#lx" # else # define LargestIntegralTypePrintfFormat "%#llx" # endif This seems inconsistent as the permanent "0x" prefix used on WIN32 allows for representing zero values with a hexadecimal prefix (e.g. "0x0") but the "#" flag represents the zero without any prefix (e.g. "0").
[PATCH] Fixed format specifier width mismatch | Joseph Ates <joseph.ates@xxxxxxxxxxxxx> |
Re: [PATCH] Fixed format specifier width mismatch | Lukas Slebodnik <lslebodn@xxxxxxxxxx> |