Re: fio make warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hmm,

On 15 June 2018 at 18:53, Jeff Furlong <jeff.furlong@xxxxxxx> wrote:
> On some kernels, I am getting a make warning:
>
> CC init.o
> init.c: In function td_fill_rand_seeds:
> init.c:1049:18: warning: array subscript is above array bounds [-Warray-bounds]
>     td->rand_seeds[i] = FIO_RANDSEED * td->thread_number
>                   ^
> init.c:1049:18: warning: array subscript is above array bounds [-Warray-bounds]
> init.c:1049:18: warning: array subscript is above array bounds [-Warray-bounds]
> init.c:1049:18: warning: array subscript is above array bounds [-Warray-bounds]

Assuming latest fio (af84cd66149507424814cf9c0b4950f4cf66e3b7 ):

>From fio.h
244: unsigned long rand_seeds[FIO_RAND_NR_OFFS];

init.c
1048: for (i = 0; i < FIO_RAND_NR_OFFS; i++)

So the array is from 0 - (FIO_RAND_NR_OFFS - 1) and i should going
from 0 - (FIO_RAND_NR_OFFS - 1). Not sure I understand the issue...

Which compiler were you using and what version was it?

-- 
Sitsofe | http://sucs.org/~sits/
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux