Commit 08e46987 authored by erikd's avatar erikd

oggz_macros.h : Add UNUSED and WARN_UNUSED macros.

git-svn-id: http://svn.annodex.net/liboggz/trunk@3199 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent dcdd2983
......@@ -47,4 +47,22 @@
#undef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
/*
** Inspiration : http://sourcefrog.net/weblog/software/languages/C/unused.html
*/
#ifdef UNUSED
#elif defined (__GNUC__)
# define UNUSED(x) UNUSED_ ## x __attribute__ ((unused))
#elif defined (__LCLINT__)
# define UNUSED(x) /*@unused@*/ x
#else
# define UNUSED(x) x
#endif
#ifdef __GNUC__
# define WARN_UNUSED __attribute__ ((warn_unused_result))
#else
# define WARN_UNUSED
#endif
#endif /* __OGGZ_MACROS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment