Subject: Re: lint warning in /usr/include/machine/lock.h.
To: Simon Burge <simonb@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-alpha
Date: 06/05/2000 16:17:11
On Tue, Jun 06, 2000 at 09:09:18AM +1000, Simon Burge wrote:

 > In /usr/include/machine/lock.h, lint complains that the following
 > 
 > 	static __inline int
 > 	__cpu_simple_lock_try(__cpu_simple_lock_t *alp)
 > 	{
 > 		unsigned long t0, v0;
 > 		...
 > 		return (v0);
 > 	}
 > 
 > "warning: conversion from 'unsigned long' may lose accuracy".
 > 
 > Should __cpu_simple_lock_try return an 'unsigned long'?  I haven't
 > looked further to see where this is used...

Hm.  Try changing that to:

	return (v0 != 0);

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>