[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081106152421.a9cf964f.sfr@canb.auug.org.au>
Date: Thu, 6 Nov 2008 15:24:21 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: "David S. Miller" <davem@...emloft.net>,
LKML <linux-kernel@...r.kernel.org>,
"William L. Irwin" <wli@...omorphy.com>,
<sparclinux@...r.kernel.org>
Subject: tty warning
Hi Alan,
A sparc allmodconfig build gives these warnings:
drivers/char/n_tty.c: In function 'n_tty_poll':
drivers/char/n_tty.c:1592: warning: array subscript is above array bounds
drivers/char/n_tty.c:1601: warning: array subscript is above array bounds
drivers/char/n_tty.c: In function 'n_tty_read':
drivers/char/n_tty.c:1306: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c: In function 'set_termios':
drivers/char/tty_ioctl.c:574: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:578: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c: In function 'tty_mode_ioctl':
drivers/char/tty_ioctl.c:729: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:963: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:969: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:618: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:1007: warning: array subscript is above array bounds
drivers/char/tty_ioctl.c:1015: warning: array subscript is above array bounds
These are things like:
termios->c_cc[VTIME] = 0;
termios is a (struct ktermios *) which has "cc_t c_cc[NCCS];". NCCS is
17 and VTIME is also 17. I assume the intention is to actually fill in
_x_cc[0], but why is it done this way and not more directly?
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists