Re: (void)foo or __unused foo ?

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Fri, 27 Jul 2012 11:25:22 -0700
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
Received on Fri Jul 27 2012 - 16:25:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC