[Top][All Lists]

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

ncurses-5.9 compilation warning

From: Ilya Gordeev
Subject: ncurses-5.9 compilation warning
Date: Tue, 21 Apr 2015 20:33:55 +0300

Compiling ncurses-5.9 by gcc-4.9.2 I'v got this message:
ncurses/base/lib_getch.c:177:19: warning: array subscript is below array bounds 

It's because sometimes "head" may be equal to -1 but it is not handled before 
accessing to sp->_fifo[head] in fifo_pull()
For example, fifo_pull() may be called in nc_wgetch() within condition block "if (head == -1 
&& ...)"

Ilya Gordeev.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]