shared: add define _nm_unused for __attribute__((unused))

This is both supported by clang and gcc. Using it is nicer then
casting the (void), which requires an additional line of code.

(cherry picked from commit ee29228277)
This commit is contained in:
Thomas Haller 2016-05-12 09:58:36 +02:00
parent b952f54cb1
commit 77ba50c2a6

View file

@ -27,6 +27,7 @@
/********************************************************/
#define _nm_packed __attribute__ ((packed))
#define _nm_unused __attribute__ ((unused))
#define nm_auto(fcn) __attribute__ ((cleanup(fcn)))