From owner-freebsd-audit Sat Jun 8 18:56:33 2002 Delivered-To: freebsd-audit@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id BCCD137B403; Sat, 8 Jun 2002 18:56:29 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g591sRq16014; Sat, 8 Jun 2002 21:54:27 -0400 (EDT) (envelope-from mike) Date: Sat, 8 Jun 2002 21:54:27 -0400 From: Mike Barcroft To: Giorgos Keramidas Cc: audit@FreeBSD.org Subject: Re: warns fixes for bin/date Message-ID: <20020608215427.C87326@espresso.q9media.com> References: <20020609013953.GA71960@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020609013953.GA71960@hades.hell.gr>; from keramida@FreeBSD.org on Sun, Jun 09, 2002 at 04:39:53AM +0300 Organization: The FreeBSD Project Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Giorgos Keramidas writes: > The type of a variable passed to getsockopt and recvfrom in > src/bin/date/netdate.c is `int'. Changing it to `socklen_t' > fixes the only warnings that this utility has when compiling > with WARNS=6. > > How does this look? I think you might get additional warnings on LP64 system like alpha and sparc64, since `size_t' != `socklen_t' on those systems. It's probably okay to explicitly cast the return values from sizeof() to `socklen_t' for all the uses of `length'. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message