From: Robert Reif <reif@earthlink.net>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
"David S. Miller" <davem@davemloft.net>,
LKML <linux-kernel@vger.kernel.org>,
"William L. Irwin" <wli@holomorphy.com>,
sparclinux@vger.kernel.org
Subject: Re: tty warning
Date: Thu, 06 Nov 2008 06:52:03 -0500 [thread overview]
Message-ID: <4912DA63.6050909@earthlink.net> (raw)
In-Reply-To: <20081106152421.a9cf964f.sfr@canb.auug.org.au>
Stephen Rothwell wrote:
> 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?
>
>
There is a patch here that fixes it:
http://marc.info/?l=linux-sparc&m=122048348932653&w=2
next prev parent reply other threads:[~2008-11-06 12:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 4:24 tty warning Stephen Rothwell
2008-11-06 4:25 ` David Miller
2008-11-06 4:35 ` Stephen Rothwell
2008-11-06 10:18 ` Alan Cox
2008-11-06 11:52 ` Robert Reif [this message]
2008-11-13 7:52 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4912DA63.6050909@earthlink.net \
--to=reif@earthlink.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=sparclinux@vger.kernel.org \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox