qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 1/2] ARM: exynos4210: CMU support


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3 1/2] ARM: exynos4210: CMU support
Date: Wed, 4 Jul 2012 14:54:07 +0100

On 4 July 2012 14:45, Maksim Kozlov <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]