Re: array subscript is below array bounds

Bert Wesarg <bert.wesarg-gM/[email protected]>
Newsgroups gmane.editors.nedit.user
Message-ID <[email protected]>
On Fri, Nov 6, 2009 at 00:07, John Ferrier <john_j_ferrier-/[email protected]> wrote:
> Just noticed when compiling your GIT source code:
>
> gcc -c -I../Microline -I../Xlt -O3 -W -Wall -Wno-unused -Wno-sign-compare -Wno-strict-aliasing -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DEDITRES -o search.o search.c
> search.c: In function \u2018WriteSearchHistory\u2019:
> search.c:4773: warning: array subscript is below array bounds
> search.c:4774: warning: array subscript is below array bounds
> search.c: In function \u2018rFindArrowKeyCB\u2019:
> search.c:2453: warning: array subscript is below array bounds
> search.c:2454: warning: array subscript is below array bounds
I've checked this a while ago and these are false postives. For the
rFindArrowKeyCB() case we check the return value of historyIndex() a
few lines above, if it is in range. For the WriteSearchHistory() case
(which is from patch #2387569)  the loop is in range [1,NHist] which
also never returns a negative index.

Also, I follow TK's argument and extend it: please before you report
problems you see with my nedit-bw.git patch repository to me, please
verify it with an unpatched source tree, whether this comes from the
CVS, GIT, or HG repo is than irrelevant. And than report it to the
list. Thank you.

Regards,
Bert
>
>
> Regards,
>
> John
-- 
NEdit Discuss mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.