From: Michael Buesch <fsdeveloper@yahoo.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>,
Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: [PATCH 2.4.22-pre5] another cpia.c warning fix
Date: Mon, 14 Jul 2003 21:16:48 +0200 [thread overview]
Message-ID: <200307142116.48774.fsdeveloper@yahoo.de> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
This patch fixes these warnings:
cpia.c:1686: Warnung: comparison is always false due to limited range of data type
cpia.c:1688: Warnung: comparison is always false due to limited range of data type
cpia.c:1690: Warnung: comparison is always false due to limited range of data type
cpia.c:1692: Warnung: comparison is always false due to limited range of data type
The warnings are thrown, because an u8 is tested against >255.
As far as I can see, these tests are completely useless,
because u8 will never be >255.
struct cam_params {
[SNIP]
struct {
u8 gainMode;
u8 expMode;
u8 compMode;
u8 centreWeight;
u8 gain;
u8 fineExp;
u8 coarseExpLo;
u8 coarseExpHi;
u8 redComp;
u8 green1Comp;
u8 green2Comp;
u8 blueComp;
} exposure;
[SNIP]
};
- --- drivers/media/video/cpia.c.orig 2003-06-13 20:52:37.000000000 +0200
+++ drivers/media/video/cpia.c 2003-07-14 21:12:45.000000000 +0200
@@ -1683,13 +1683,9 @@
* values. - rich@annexia.org
*/
if (cam->params.exposure.redComp < 220 ||
- - cam->params.exposure.redComp > 255 ||
cam->params.exposure.green1Comp < 214 ||
- - cam->params.exposure.green1Comp > 255 ||
cam->params.exposure.green2Comp < 214 ||
- - cam->params.exposure.green2Comp > 255 ||
- - cam->params.exposure.blueComp < 230 ||
- - cam->params.exposure.blueComp > 255)
+ cam->params.exposure.blueComp < 230)
{
printk (KERN_WARNING "*_comp parameters have gone AWOL (%d/%d/%d/%d) - reseting them\n",
cam->params.exposure.redComp,
- --
Regards Michael Buesch
http://www.8ung.at/tuxsoft
21:12:56 up 2:23, 3 users, load average: 1.20, 1.06, 1.13
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/EwGgoxoigfggmSgRAgOyAJ42TUVPCMuuFhlhQne351LQAayyrACfY5gn
LdtWXgKauUanjuwOn6cfM/c=
=ZwVh
-----END PGP SIGNATURE-----
reply other threads:[~2003-07-14 19:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200307142116.48774.fsdeveloper@yahoo.de \
--to=fsdeveloper@yahoo.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.