[PATCH] include: linux/iopoll: fix uninitialized warning
Sascha Hauer
s.hauer at pengutronix.de
Tue Sep 3 04:39:34 PDT 2024
On Tue, 03 Sep 2024 11:37:12 +0200, Rouven Czerwinski wrote:
> In gcc 13.3 there is a warning that start may be used unitialized:
>
> include/linux/iopoll.h:42:21: warning: ‘start’ may be used uninitialized [-Wmaybe-uninitialized]
> 42 | is_timeout(start, ((timeout_us) * USECOND))) { \
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> The warning is bogus since before usage of start !IN_PBL and
> timeout_us != 0 are checked for the case where start is used, but in
> this case it is also always initialized to get_time_ns().
> Initialize it to zero to silence the warning.
>
> [...]
Applied, thanks!
[1/1] include: linux/iopoll: fix uninitialized warning
https://git.pengutronix.de/cgit/barebox/commit/?id=7485dad4a06c (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list