Thread (7 messages) 7 messages, 3 authors, 2023-07-21

RE: [PATCH] blk-iocost: fix seq_printf compile type mismatch error

From: David Laight <hidden>
Date: 2023-07-19 08:57:40
Also in: linux-block, lkml

From: Tejun Heo
Sent: 17 July 2023 19:49

On Mon, Jul 17, 2023 at 09:18:52AM -0500, Carlos Bilbao wrote:
quoted
From: amd <redacted>

Fix two type mismatch errors encountered while compiling blk-iocost.c with
GCC version 13.1.1 that involved constant operator WEIGHT_ONE. Cast the
result of the division operation to (unsigned int) to match the expected
format specifier %u in two seq_printf invocations.
Can you detail the warnings? Was that on 32bit compiles?
The problem is caused by gcc 13 changing the types of the
constants inside an enum to be all the same.

The best fix is (probably) to replace all the enum used to
define unrelated constants with #defines.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help