Re: [patch v2] virtio_console: silence a static checker warning

Dan Carpenter
2015-05-08T12:18:45Z

On Fri, May 08, 2015 at 01:13:22PM +0200, walter harms wrote:
> The basic idea was to limit the space, having leading zeros is my idea because
> i found this more convenient in the past. Using something like "%3u" will give
> static checkers a chance to detect the required max. space.

How are you calculating the %3?

The max for "id" is currently 31. To be honest, I'm not certain the max
for ->index. It's something in qemu but I'm not sure what. Who is
going to keep it updated?

The %3 is sort of meaningless. The lower levels of the code just ignore
it don't they?

regards,
dan carpenter