From: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>
To: Richard Henderson <rth@redhat.com>,
George France <france@handhelds.org>,
axp-list mailing list <axp-list@redhat.com>,
linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] eliminate compile warnings
Date: Fri, 8 Nov 2002 07:38:45 +0000 [thread overview]
Message-ID: <20021108073845.A17905@Marvin.DL8BCU.ampr.org> (raw)
In-Reply-To: <20021107173349.A4017@twiddle.net>; from rth@twiddle.net on Thu, Nov 07, 2002 at 05:33:49PM -0800
On Thu, Nov 07, 2002 at 05:33:49PM -0800, Richard Henderson wrote:
> As for the patch itself, it's not correct. At a glance,
>
> > addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
> > - if (addr != -ENOMEM)
> > + if (addr != (unsigned) -ENOMEM)
>
> addr is unsigned long. If you truncate -ENOMEM to 32-bits, it will
> never match. There appears to be much more int/long confusion later.
I will give my patch another thought and I will feed it to you in smaller
pieces and with comments.
> You have to be /exceedingly/ careful to fix these warnings without
> introducing new bugs. If you change the type of a variable, you
> have to examine each and every use of the variable to determine if
> the semantics are unchanged. If you add a cast, you have to be sure
> that you cast to a type of the correct width. If you're adding lots
> of casts, you should think about changing the type of one or more
> variables.
Generally I'm aware of this - maybe a case of more coffee needed :)
> It's enough to make me wish we had -Wno-sign-compare in CFLAGS by
> default for the nonce. Which, incidentally, is what I've been doing
> for my own builds.
>
> There's absolutely no way I'm going to apply a jumbo patch that
> changes hundreds of these at once. If you still want to fix these,
> then you'll need to send them one at a time and include analysis of
> why each change is correct.
Will do.
Thanks for your time.
Thorsten
--
| 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] |
next prev parent reply other threads:[~2002-11-08 7:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-06 21:47 [PATCH] eliminate compile warnings Thorsten Kranzkowski
2002-11-07 14:22 ` George France
2002-11-07 17:17 ` Ted Goodridge
2002-11-07 19:59 ` George France
2002-11-07 20:28 ` Thorsten Kranzkowski
2002-11-07 20:55 ` George France
2002-11-08 1:33 ` Richard Henderson
2002-11-08 2:54 ` George France
2002-11-08 3:25 ` Richard Henderson
2002-11-08 4:04 ` George France
2002-11-08 7:38 ` Thorsten Kranzkowski [this message]
2002-11-08 17:28 ` Michal Jaegermann
2002-11-08 21:50 ` Thorsten Kranzkowski
2002-11-09 0:42 ` Michal Jaegermann
2002-11-09 1:32 ` Thorsten Kranzkowski
[not found] ` <3DCA9A88.4060109@pobox.com>
2002-11-07 21:43 ` Thorsten Kranzkowski
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