On 4 July 2012 14:45, Maksim Kozlov <[email protected]> wrote:
> 04.07.2012 14:38, Dunrong Huang пишет:
>>> + PRINT_DEBUG("%s rate: %llu\n", pll->name, pll->rate);
>>
>> pll->rate is of type uint64_t incompatible with "%llu"
>
>
> Type uint64_t is included from /usr/include/stdint.h as
>
> typedef unsigned long long int uint64_t;
On a 64 bit system this typedef is:
typedef unsigned long int uint64_t;
> and 'll' specifies that a following 'u' conversion specifier
> applies to a unsigned long long argument
...and the compiler will complain about using 'll' with it,
as you can confirm if you try to build on a 64 bit box with
debug enabled.
This is why the PRI* POSIX macros exist. You need to use
PRINT_DEBUG("%s rate: %" PRIu64 "\n", pll->name, pll->rate);
(watch the quotes there.)
-- PMM