mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: margitsw@t-online.de (Margit Schubert-While)
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.73 compile warnings
Date: Mon, 30 Jun 2003 18:03:19 +0200	[thread overview]
Message-ID: <20030630160319.GA15506@win.tue.nl> (raw)
In-Reply-To: <5.1.0.14.2.20030630170916.00afd930@pop.t-online.de>

On Mon, Jun 30, 2003 at 05:13:05PM +0200, Margit Schubert-While wrote:
> 2.5.73 + latest cset
> GCC 3.3
> 
> drivers/char/vt_ioctl.c: In function `do_kdsk_ioctl':
> drivers/char/vt_ioctl.c:85: warning: comparison is always false due to 
> limited range of data type
> drivers/char/vt_ioctl.c:85: warning: comparison is always false due to 
> limited range of data type
> drivers/char/vt_ioctl.c: In function `do_kdgkb_ioctl':
> drivers/char/vt_ioctl.c:211: warning: comparison is always false due to 
> limited range of data type
> 
> drivers/char/keyboard.c: In function `k_fn':
> drivers/char/keyboard.c:665: warning: comparison is always true due to 
> limited range of data type

These are checks of the "cannot happen" type, where "cannot happen"
can be seen by the compiler, so that it can optimize the tests away.

As it is now, correctness of the code can be seen locally.
If the tests are removed, a human reader must look up the values
of these constants to conclude that the code is correct.


  reply	other threads:[~2003-06-30 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-30 15:13 Margit Schubert-While
2003-06-30 16:03 ` Andries Brouwer [this message]
2003-06-30 20:27   ` Adrian Bunk
2003-07-01  7:30 Margit Schubert-While

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=20030630160319.GA15506@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=margitsw@t-online.de \
    /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

all inboxes | Powered by JetHome®