On Mon, Jul 20, Jan Beulich wrote:

> >>> On 19.07.15 at 11:33, <o...@aepfle.de> wrote:
> > [  198s] block-log.c:549:23: error: array subscript is above array bounds 
> > [-Werror=array-bounds]
> > [  198s]      if (s->connections[i].id == id)
> > [  198s]                        ^
> 
> So what makes the compiler right with that complaint? I.e. how does
> it know i > 0 here? After all - afaict - s->connected can only be 0 or

It has to assume that ->connected can get any value because the input
comes from outside the unit.

To reduce the patch size "&& i < MAX_CONNECTIONS" could be added.

Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to