On Monday 24 April 2017 15:53:07 Andreas Fritiofson wrote:

> Kind of missing the point, identifiers starting with double underscore 
are
> reserved for all uses and can't be assumed to have any specific 
meaning.
> Change the name in that case ("attribute_unused" for example).

Makes me wonder why sys/cdefs.h on MacOS X defines __unused in 
the first place. But hey, who am I to ask.

> Another option is to simply remove "static"; if the function is exported it
> will no longer be unused. With the addition of a small comment 
explaining
> why it's exported and unused, I think that's perfectly acceptable.

Hm, I'm not very much in favor of extending the visibility of a function, in a 
sense it's an even dirtier trick than using a compiler attribute. I think I'll 
go for "attribute_unused" or even remove the #define entirely like 
Freddie Chopin suggested. As long as the function can stay where it is 
and I don't need to #ifdef it entirely.

BR,
Matthias

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to