Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jul 2012 16:47:15 +0700
From:      Erich Dollansky <erichfreebsdlist@ovitrap.com>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        current@freebsd.org
Subject:   Re: (void)foo or __unused foo ?
Message-ID:  <20120727164715.51ba740d@AMD620.ovitrap.com>
In-Reply-To: <20120727093824.GB56662@onelab2.iet.unipi.it>
References:  <20120727093824.GB56662@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Fri, 27 Jul 2012 11:38:24 +0200
Luigi Rizzo <rizzo@iet.unipi.it> wrote:

> In writing cross platform code I often have to deal with function
> arguments or variables that are not used on certain platforms.
> In FreeBSD:sys/cdefs.h we have
> 
if I understand you right here, it is you own code that has to run on
different platforms.

I can only tell what we are doing since a long long time. We have one
file which handles all these things in one central location.

This makes all other files independent of the platform but this one
file might needs some work when a new platform comes in or things
change on one platform.

> Any disadvantage or objection to selectively use this form
> in our kernel code for parts that need to work on multiple
> platforms ?

This concept also works inside a kernel, driver or in the world. The
concept should then be limited to the module.

Erich



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120727164715.51ba740d>