From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id 7239843610 for ; Fri, 8 Nov 2002 20:33:08 -0500 (EST) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id gA91X8X14426 for axp-list@listman.redhat.com; Fri, 8 Nov 2002 20:33:08 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id gA91X8f14422 for ; Fri, 8 Nov 2002 20:33:08 -0500 Received: from Marvin.DL8BCU.ampr.org (root@p50829A93.dip.t-dialin.net [80.130.154.147]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id gA91AHw12294 for ; Fri, 8 Nov 2002 20:10:17 -0500 Received: from dl8bcu.de (th@localhost [127.0.0.1]) by Marvin.DL8BCU.ampr.org (8.12.1/8.12.1) with ESMTP id gA91X0VK018739; Sat, 9 Nov 2002 01:33:00 GMT Received: (from th@localhost) by dl8bcu.de (8.12.1/8.12.1/Submit) id gA91WwLw018738; Sat, 9 Nov 2002 01:32:58 GMT X-Authentication-Warning: Marvin.borg.net: th set sender to dl8bcu@dl8bcu.de using -f Date: Sat, 9 Nov 2002 01:32:58 +0000 From: Thorsten Kranzkowski To: axp-list@redhat.com Cc: michal@ellpspace.math.ualberta.ca Subject: Re: [PATCH] eliminate compile warnings Message-ID: <20021109013258.K18411@Marvin.DL8BCU.ampr.org> Mail-Followup-To: axp-list@redhat.com, michal@ellpspace.math.ualberta.ca References: <20021106214705.A15525@Marvin.DL8BCU.ampr.org> <02110709222600.14483@shadowfax.middleearth> <20021107202855.B17028@Marvin.DL8BCU.ampr.org> <20021107173349.A4017@twiddle.net> <20021108073845.A17905@Marvin.DL8BCU.ampr.org> <20021108102823.A4439@ellpspace.math.ualberta.ca> <20021108215056.C18411@Marvin.DL8BCU.ampr.org> <20021108174229.B5518@ellpspace.math.ualberta.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20021108174229.B5518@ellpspace.math.ualberta.ca>; from michal@ellpspace.math.ualberta.ca on Fri, Nov 08, 2002 at 05:42:29PM -0700 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com X-Reply-To: dl8bcu@dl8bcu.de List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On Fri, Nov 08, 2002 at 05:42:29PM -0700, Michal Jaegermann wrote: > On Fri, Nov 08, 2002 at 09:50:56PM +0000, Thorsten Kranzkowski wrote: > > if you will try to _reduce_ number of casts by making sure that types of > > > objects agree, if only possible, instead of sprinkling code with extra > > > > I've actually done that. > > You mean in a version you are working on now? There was quite yes, indeed. estimated 60-70% were redefined variables, not casts. > a few extra casts in what I have seen. Some of them appeared > "obviously correct" but this was not the case for others. > > > > But if you want a unsigned constant with all bits on then ~0UL is surely > > > preferable over casting (-1) to unsigned long; even if just for clarity. > > > > ok, what do you suggest when there's a > > return ( x ? 0 : -ENOMEM ) > > in a function declared as unsigned long ? > > I noticed this in a patch for setup.c: > > - if (bootmap_start == -1) { > + if (bootmap_start == (unsigned long)-1L) { > > What I meant that it seems that you really wanted here > > if (bootmap_start == ~0UL) { yes, you're right. I've done it that way now. > I did not check if there are other spots of that sort. > > If you refer to what displeased Richard then if a return value from I made the stupid error to think (signed) only changes signedness. I actually knew that this is not the case, but.... Now I'll stand ashamed in the corner for five minutes :) > Michal 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] |