From owner-cvs-all Sun Feb 3 8:25:20 2002 Delivered-To: cvs-all@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 8A47937B405; Sun, 3 Feb 2002 08:25:11 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id g13GPAJ03795; Sun, 3 Feb 2002 16:25:10 GMT (envelope-from mark@grondar.za) Received: from greenpeace.grondar.org (greenpeace [192.168.42.2]) by gratis.grondar.org (Postfix) with ESMTP id 2E0CCBF; Sun, 3 Feb 2002 16:20:22 +0000 (GMT) Received: from grondar.za (localhost [127.0.0.1]) by greenpeace.grondar.org (8.11.6/8.11.6) with ESMTP id g13G83E47024; Sun, 3 Feb 2002 16:08:07 GMT (envelope-from mark@grondar.za) Message-Id: <200202031608.g13G83E47024@greenpeace.grondar.org> To: Bruce Evans Cc: Mark Murray , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys socket.h types.h References: <20020203230517.L19026-100000@gamplex.bde.org> In-Reply-To: <20020203230517.L19026-100000@gamplex.bde.org> ; from Bruce Evans "Mon, 04 Feb 2002 00:06:49 +1100." Date: Sun, 03 Feb 2002 16:07:58 +0000 From: Mark Murray Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ok, So what needs to be done? M > On Sun, 3 Feb 2002, Mark Murray wrote: > > > markm 2002/02/03 03:36:59 PST > > > > Modified files: > > sys/sys socket.h types.h > > Log: > > Zero functional difference; make some integer constants unsigned, as > > they are used in unsigned context. This shuts lint(1) up in a few > > significant ways with "signed/unsigned" arithmetic warnings. > > > > Revision Changes Path > > 1.58 +2 -2 src/sys/sys/socket.h > > 1.50 +3 -3 src/sys/sys/types.h > > The change to howmany() is not good. It changes the functionality of > howmany() on negative values. howmany() never worked right on negative > values, so this is not very important. More importantly, the change > causes sign mismatches and brokenness where there was none before, e.g., > for > > const int x = 0; > > assert(howmany(x, 1) - 1 < 0); > > Also, the change usually doesn't fix the warning for > > const long long x = 0; > const unsigned long long y = 0; > > assert(howmany(x, 1) == y); > > since 1U is usually promoted to 1LL in the changed howmany(). > > Bruce > -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message