RE: fio make warning

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

 



Right, using the latest git.  I checked the latest releases and fio-3.5 does not have the warning, but fio-3.6 introduces it.  I was using gcc version 4.8.3 20140911.  I moved to gcc version 4.8.5 20150623 on another kernel and I don't see the issue.  Odd how the warning only happens with in between compiler versions and latest fio source.

Regards,
Jeff

-----Original Message-----
From: Sitsofe Wheeler [mailto:sitsofe@xxxxxxxxx] 
Sent: Friday, June 15, 2018 2:45 PM
To: Jeff Furlong <jeff.furlong@xxxxxxx>
Cc: fio@xxxxxxxxxxxxxxx
Subject: Re: fio make warning

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/
��.n��������+%������w��{.n�������^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[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