From: Michael Buesch <fsdeveloper@yahoo.de>
To: Ishikawa <ishikawa@yk.rim.or.jp>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: Warning messages during compilation of 2.4.21. (5 files)
Date: Sun, 22 Jun 2003 16:58:26 +0200 [thread overview]
Message-ID: <200306221658.36409.fsdeveloper@yahoo.de> (raw)
In-Reply-To: <3EF5B80C.7F5340F7@yk.rim.or.jp>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sunday 22 June 2003 16:07, Ishikawa wrote:
> > >
> > > (for example, the line 283 of vt.c could be re-written to
> > > int kludge_i; /* to shut up warning */
> > >
> > > if((kludge_i = tmp.kb_func) >= MAX_NR_FUNC)
> > > return -EINVAL;
> >
> > Some days ago, I've also looked over it to find a solution. :)
> > But IMHO the kludge_i is far more uglier than the warning.
> > What about that:
> >
> > if((int)tmp.kb_func >= MAX_NR_FUNC)
> > return -EINVAL;
> >
> > Doesn't it work?
>
> Unfortunately, GCC 3.3 is so clever that
> mere type casting (as you suggested) still produced warning.
> Only after assigning to an integer variable, I see
> the warning message gone. Tough luck.
> Agreed. The remedy is very ugly.
What about adding something like that:
#if MAX_NR_FUNC < 256
if((int)tmp.kb_func >= MAX_NR_FUNC)
return -EINVAL;
#endif
Sure, this is ugly, too, but I think the warning is
_very_ ugly. Another solution is, what you already
said, to completely remove this if ().
>
> Regards,
>
> Ishikawa Chiaki
- --
Regards Michael Büsch
http://www.8ung.at/tuxsoft
16:52:16 up 1:46, 1 user, load average: 1.16, 1.14, 1.06
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+9cQcoxoigfggmSgRAi0CAJ9kkvQfNEQ3vpSLDzPhVLhZ5qoB0gCcC+mn
DCEUHvdUN4QssLP/HaRtb2U=
=wK2z
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-06-22 14:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-21 20:01 Warning messages during compilation of 2.4.21. (5 files) Ishikawa
2003-06-22 11:47 ` Michael Buesch
2003-06-22 14:07 ` Ishikawa
2003-06-22 14:58 ` Michael Buesch [this message]
2003-06-22 18:50 ` Ishikawa
2003-06-22 15:12 ` Michael Buesch
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=200306221658.36409.fsdeveloper@yahoo.de \
--to=fsdeveloper@yahoo.de \
--cc=ishikawa@yk.rim.or.jp \
--cc=linux-kernel@vger.kernel.org \
/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