Hi,
2016/2/23 Tue 1:57:58 UTC+9 Bram Moolenaar wrote:
> > [...]
> > os_win32.c: In function 'read_console_input.constprop.22':
> > os_win32.c:299:28: warning: array subscript is above array bounds
> > [-Warray-bounds]
> > s_irCache[i] = s_irCache[i + 1];
> > ^
>
> Not sure how to fix this. Or even if this is a real problem.
I think this is a compiler problem:
if (s_dwMax > 1)
{
head = 0;
tail = s_dwMax - 1;
...
for (i = head; i < tail; ++i)
s_irCache[i] = s_irCache[i + 1];
The maximum value of i is tail-1 = s_dwMax-2. So the maximum i+1 is s_dwMax-1.
I confirmed that gcc 4.9.2 and gcc 5.3.0 don't warn this.
Regards,
Ken Takata
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.