On 28 January 2017 at 13:16, dcb <1660...@bugs.launchpad.net> wrote:
> Public bug reported:
>
> hw/timer/altera_timer.c:207:5: warning: ‘memset’ used with length equal
> to number of elements without multiplication by element size [-Wmemset-
> elt-size]
>
> Source code is
>
>      memset(t->regs, 0, ARRAY_SIZE(t->regs));
>
> Maybe better code
>
>      memset(t->regs, 0, R_MAX * sizeof( uint32_t));

Better still -- just memset(t->regs, 0, sizeof(t->regs));

Chris, could you send a patch to fix this, please?

thanks
-- PMM

Reply via email to