diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-06-22 14:04:43 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-06-22 14:04:43 -0700 |
commit | 32b5482843c1227fef1afa8fe6974c373dd9a178 (patch) | |
tree | e430204dc825ce07f42769dfa51c74d930de34eb /gencode.h | |
parent | 2933fb0ae763f9463eb904ed6ddf0a033b6ba635 (diff) |
Avoid some warnings from Sun C.
Some versions of Sun C support __attribute__ but don't support the
"unused" or "format" attributes - they don't fail, but they whine a lot.
Check whether they can be used without warnings, and use them only if
they can.
Diffstat (limited to 'gencode.h')
-rw-r--r-- | gencode.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -336,7 +336,11 @@ struct block *gen_p80211_fcdir(int); void bpf_optimize(struct block **); void bpf_error(const char *, ...) - __attribute__((noreturn, format (printf, 1, 2))); + __attribute__((noreturn)) +#ifdef __ATTRIBUTE___FORMAT_OK + __attribute__((format (printf, 1, 2))) +#endif /* __ATTRIBUTE___FORMAT_OK */ + ; void finish_parse(struct block *); char *sdup(const char *); |