[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH 11/40] arm64: time.c: fix the wrong format for printk
Hi Shijie, On 03/11/17 03:11, Huang Shijie wrote: We will meet the compilor error for the current code: s/compilor/compiler/ -------------------------------------------------- time.c: In function ‘init_time’: time.c:131:12: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Werror=format=] printk("Virtual Count register is %llx, freq = %d Hz\n", cntvct_at_init, counter_freq); ^ cc1: all warnings being treated as errors -------------------------------------------------- This patch fixes the compiling error. Change-Id: Ib89617f221d271c608a1757109b7be946b0b4c46 Jira: ENTOS-247 Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx> --- arch/arm/time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/time.c b/arch/arm/time.c index a088981..0e68a4f 100644 --- a/arch/arm/time.c +++ b/arch/arm/time.c @@ -128,7 +128,8 @@ void init_time(void)__asm__ __volatile__("mrc p15, 0, %0, c14, c0, 0":"=r"(counter_freq));cntvct_at_init = read_virtual_count(); - printk("Virtual Count register is %llx, freq = %d Hz\n", cntvct_at_init, counter_freq); + printk("Virtual Count register is %llx, freq = %d Hz\n", + (unsigned long long) cntvct_at_init, counter_freq); When I read "fix the wrong format printk", I expect the format to be fixed. Not adding a suspicious cast. You could use PRIx64 here. Cheers, }void fini_time(void) -- Julien Grall _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |