summaryrefslogtreecommitdiff
path: root/thunk.h
diff options
context:
space:
mode:
Diffstat (limited to 'thunk.h')
-rw-r--r--thunk.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/thunk.h b/thunk.h
index 4a8060e..7fbdfbd 100644
--- a/thunk.h
+++ b/thunk.h
@@ -440,7 +440,12 @@ struct thunk_t {
* function definition, all in one place in one fell swoop.
*/
#define THUNK_DEFINE_STATIC(_name, ...) \
- static int _THUNK_GEN_PROTO(_name, __VA_ARGS__); \
+ static int _THUNK_GEN_PROTO(_name, __VA_ARGS__) __attribute__ ((unused));\
+ static int __thunk_dispatch_##_name(thunk_t *thunk) __attribute__ ((unused));\
+ static thunk_t * __thunk_alloc_##_name(void **payload_ptr, size_t payload_size) __attribute__ ((unused));\
+ static thunk_t * _THUNK_GEN_PROTO(__thunk_instantiate_##_name, __VA_ARGS__) __attribute__ ((unused));\
+ static thunk_t * _THUNK_GEN_INIT_PROTO(__thunk_init_##_name, thunk_t *_thunk, __VA_ARGS__) __attribute__ ((unused));\
+ \
typedef struct __thunk_environment_##_name { \
/* struct for encapsulating the calling environment */ \
thunk_t __thunk; \
@@ -511,7 +516,7 @@ struct thunk_t {
* .h from the implementing .c - not just the consumers.
*/
#define THUNK_DECLARE(_name, ...) \
- int _THUNK_GEN_PROTO(_name, __VA_ARGS__); \
+ int _THUNK_GEN_PROTO(_name, __VA_ARGS__) __attribute__ ((unused)); \
typedef struct __thunk_environment_##_name { \
/* struct for encapsulating the calling environment */ \
thunk_t __thunk; \
@@ -519,10 +524,10 @@ struct thunk_t {
char __payload[]; \
} __thunk_environment_##_name; \
\
- int __thunk_dispatch_##_name(thunk_t *thunk); \
- thunk_t * _THUNK_GEN_INIT_PROTO(__thunk_init_##_name, thunk_t *_thunk, __VA_ARGS__);\
- thunk_t * __thunk_alloc_##_name(void **payload_ptr, size_t payload_size);\
- thunk_t * _THUNK_GEN_PROTO(__thunk_instantiate_##_name, __VA_ARGS__);
+ int __thunk_dispatch_##_name(thunk_t *thunk) __attribute__ ((unused)); \
+ thunk_t * _THUNK_GEN_INIT_PROTO(__thunk_init_##_name, thunk_t *_thunk, __VA_ARGS__) __attribute__ ((unused));\
+ thunk_t * __thunk_alloc_##_name(void **payload_ptr, size_t payload_size) __attribute__ ((unused));\
+ thunk_t * _THUNK_GEN_PROTO(__thunk_instantiate_##_name, __VA_ARGS__) __attribute__ ((unused));
#define THUNK_DEFINE(_name, ...) \
© All Rights Reserved