lkml.org 
[lkml]   [2023]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] tools/thermal/tmon: Fix compilation warning for wrong format
From
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@dev.tdt.de>
> ---

Applied, thanks

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


\
 
 \ /
  Last update: 2023-12-19 19:19    [W:0.096 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site