[PATCH] qemu: dfu: Correct memset call in set_dfu_alt_info
Simon Glass
sjg at chromium.org
Fri Apr 7 07:31:13 CEST 2023
On Fri, 7 Apr 2023 at 01:58, Tom Rini <trini at konsulko.com> 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>
> ---
> Cc: Tuomas Tynkkynen <tuomas.tynkkynen at iki.fi>
> Cc: Sughosh Ganu <sughosh.ganu at linaro.org>
> Cc: Simon Glass <sjg at chromium.org>
> ---
> board/emulation/common/qemu_dfu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list