aboutsummaryrefslogtreecommitdiff
path: root/gencode.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-06-22 14:04:43 -0700
committerGuy Harris <guy@alum.mit.edu>2013-06-22 14:04:43 -0700
commit32b5482843c1227fef1afa8fe6974c373dd9a178 (patch)
treee430204dc825ce07f42769dfa51c74d930de34eb /gencode.h
parent2933fb0ae763f9463eb904ed6ddf0a033b6ba635 (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.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gencode.h b/gencode.h
index c7f5a381..afb69338 100644
--- a/gencode.h
+++ b/gencode.h
@@ -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 *);