Subject: changing the spinlockmgr() "not used" case
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 10/17/2001 23:52:12
Folks,

If you don't assign the value returned by spinlockmgr() and don't have
either of the "MULTIPROCESSOR" or "LOCKDEBUG" options, you get the
following warnings:

	/sys/kern/kern_proc.c: In function `proclist_lock_read':
	/sys/kern/kern_proc.c:212: warning: statement with no effect
	/sys/kern/kern_proc.c: In function `proclist_lock_write':
	/sys/kern/kern_proc.c:244: warning: statement with no effect

The definition in the !(MULTIPROCESSOR || LOCKDEBUG) case is

	#define spinlockmgr(lkp, flags, intrlk)         (0)

Using

	(void)spinlockmgr(args, ...)

quells the warning, but I don't want to have to use the (void) prefix
(and not for reasons that started another ... "discussion" recently).

Is there any other ways around this?

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/