Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>
To: Richard Henderson <rth@redhat.com>,
	axp-list mailing list <axp-list@redhat.com>
Subject: [PATCH] [RESENT] compilation warnings 2/6
Date: Sat, 9 Nov 2002 01:03:12 +0000	[thread overview]
Message-ID: <20021109010312.E18411@Marvin.DL8BCU.ampr.org> (raw)
In-Reply-To: <20021109010039.D18411@Marvin.DL8BCU.ampr.org>; from dl8bcu@dl8bcu.de on Sat, Nov 09, 2002 at 01:00:39AM +0000

Part 2: variables in slightly more complex situations.


### osf_getdirentries has an unsigned int count but it's stored as
### signed int in a struct osf_dirent_callback.
### all users deal with positive values or struct osf_dirent_callback itself.
### settle down on unsigned int througout.



diff -ur linux-2.5.46/arch/alpha/kernel/osf_sys.c linux-2.5.46-ds20/arch/alpha/kernel/osf_sys.c
--- linux-2.5.46/arch/alpha/kernel/osf_sys.c	Wed Nov  6 19:04:14 2002
+++ linux-2.5.46-ds20/arch/alpha/kernel/osf_sys.c	Fri Nov  8 23:29:27 2002
@@ -104,7 +104,7 @@
 struct osf_dirent_callback {
 	struct osf_dirent *dirent;
 	long *basep;
-	int count;
+	unsigned int count;
 	int error;
 };
 
@@ -114,7 +114,7 @@
 {
 	struct osf_dirent *dirent;
 	struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf;
-	int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
+	unsigned int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
 
 	buf->error = -EINVAL;	/* only used if we fail */
 	if (reclen > buf->count)





### member is initialized with a positive number and only compared
### a dozen times against unsigned values. make it unsigned, too.

diff -ur linux-2.5.46/arch/alpha/kernel/setup.c linux-2.5.46-ds20/arch/alpha/kernel/setup.c
--- linux-2.5.46/arch/alpha/kernel/setup.c      Sat Oct 19 04:01:16 2002
+++ linux-2.5.46-ds20/arch/alpha/kernel/setup.c Fri Nov  8 23:51:35 2002
@@ -818,7 +818,7 @@
 
 	if (!vec) {
 		/* Member ID is a bit-field. */
-		long member = (variation >> 10) & 0x3f;
+		unsigned long member = (variation >> 10) & 0x3f;
 
 		cpu &= 0xffffffff; /* make it usable */
 
-- 
| Thorsten Kranzkowski        Internet: dl8bcu@dl8bcu.de                      |
| Mobile: ++49 170 1876134       Snail: Niemannsweg 30, 49201 Dissen, Germany |
| Ampr: dl8bcu@db0lj.#rpl.deu.eu, dl8bcu@marvin.dl8bcu.ampr.org [44.130.8.19] |




  reply	other threads:[~2002-11-09  1:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09  1:00 [PATCH] [RESENT] compilation warnings 1/6 Thorsten Kranzkowski
2002-11-09  1:03 ` Thorsten Kranzkowski [this message]
2002-11-09  1:05   ` [PATCH] [RESENT] compilation warnings 3/6 Thorsten Kranzkowski
2002-11-09  1:07     ` [PATCH] [RESENT] compilation warnings 4/6 Thorsten Kranzkowski
2002-11-09  1:08       ` [PATCH] [RESENT] compilation warnings 5/6 Thorsten Kranzkowski
2002-11-09  1:13         ` [PATCH] [RESENT] compilation warnings 6/6 Thorsten Kranzkowski
2002-11-09  1:47       ` [PATCH] [RESENT] compilation warnings 4/6 Michal Jaegermann
2002-11-09  5:51       ` Richard Henderson
2002-11-09  4:50     ` [PATCH] [RESENT] compilation warnings 3/6 Richard Henderson
2002-11-09 19:14       ` Peter Rival
2002-11-09 21:29         ` Michal Jaegermann
2002-11-14  6:44         ` Richard Henderson
2002-11-09  4:32 ` [PATCH] [RESENT] compilation warnings 1/6 Richard Henderson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox