[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6a9f55419ee05ba44ef40430e7a16ac4@dev.tdt.de>
Date: Wed, 20 Dec 2023 08:30:54 +0100
From: Florian Eckert <fe@....tdt.de>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Eckert.Florian@...glemail.com, rafael@...nel.org, rui.zhang@...el.com,
lukasz.luba@....com, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools/thermal/tmon: Fix compilation warning for wrong
format
On 2023-12-19 19:12, Daniel Lezcano wrote:
> On 04/12/2023 15:13, Florian Eckert wrote:
>> The following warnings are shown during compilation:
>>
>> tui.c: In function 'show_cooling_device':
>> tui.c:216:40: warning: format '%d' expects argument of type 'int',
>> but
>> argument 7 has type 'long unsigned int' [-Wformat=]
>> 216 | "%02d %12.12s%6d %6d",
>> | ~~^
>> | |
>> | int
>> | %6ld
>> ......
>> 219 | ptdata.cdi[j].cur_state,
>> | ~~~~~~~~~~~~~~~~~~~~~~~
>> | |
>> | long unsigned int
>> tui.c:216:44: warning: format '%d' expects argument of type 'int',
>> but
>> argument 8 has type 'long unsigned int' [-Wformat=]
>> 216 | "%02d %12.12s%6d %6d",
>> | ~~^
>> | |
>> | int
>> | %6ld
>> ......
>> 220 | ptdata.cdi[j].max_state);
>> | ~~~~~~~~~~~~~~~~~~~~~~~
>> | |
>> | long unsigned int
>>
>> To fix this, the correct string format must be used for printing.
>>
>> Signed-off-by: Florian Eckert <fe@....tdt.de>
>> ---
>
> Applied, thanks
Thanks :+1:
Powered by blists - more mailing lists