[PATCH] qemu: dfu: Correct memset call in set_dfu_alt_info
Tom Rini
trini at konsulko.com
Wed Apr 26 14:31:39 CEST 2023
On Thu, Apr 06, 2023 at 09:58:40AM -0400, Tom Rini wrote:
> When building with clang, we see:
> board/emulation/common/qemu_dfu.c:51:24: warning: 'memset' call operates on objects of type 'char' while the size is based on a different type 'char *' [-Wsizeof-pointer-memaccess]
>
> As we're calling memset with the length set to the size of the pointer
> and not the size of the buffer. Correct this with a call of the size of
> the buffer itself.
>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Acked-by: Sughosh Ganu <sughosh.ganu at linaro.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230426/2abe91cb/attachment.sig>
More information about the U-Boot
mailing list