Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jul 2012 11:25:22 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, current@freebsd.org
Subject:   Re: (void)foo or __unused foo ?
Message-ID:  <CAJ-VmokjrE=SMD=YgHAttVXcYHNk0hecVhfAeDmjqEp54ecyQg@mail.gmail.com>
In-Reply-To: <20120727125134.GA58187@onelab2.iet.unipi.it>
References:  <20120727093824.GB56662@onelab2.iet.unipi.it> <9654.1343388048@critter.freebsd.dk> <20120727125134.GA58187@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
I'd rather see a compiler-interpretable "way" of doing this.

You could always just use your own for now, until something comes
along (like how many #define N(a) there are in the tree, until nitems
showed up.)

Ie:

#define A_UNUSED_T    void

(A_UNUSED_T) foo;

That way (a) it's easy to change with a compile macro change, (b) if
it ever clashes, it should be easy enough to rename without having to
risk renaming fields you didn't want to, and (c) it's
compiler-interpretable.

I wonder if bde has any ideas on where a BSD "unused" hint could be stuffed..




Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokjrE=SMD=YgHAttVXcYHNk0hecVhfAeDmjqEp54ecyQg>