diff options
author | Zbigniew Chyla <zbigniew@chyla.pl> | 2015-01-16 15:46:59 +0100 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-01-21 10:47:42 -0500 |
commit | 9b07a07f6fed92d1b041bfcd8a49ca7314f75ac3 (patch) | |
tree | 4eb913a03a7b9261f5f4c9d156466fd7eec5ce58 /gpsd.h-tail | |
parent | fca5b90829621e119a310225b4f1358cd6914d5c (diff) | |
download | gpsd-9b07a07f6fed92d1b041bfcd8a49ca7314f75ac3.tar.gz |
Add compiler.h with compiler specific macros.
Use new macros (UNUSED, PRINTF_FUNC) where appropriate.
This change doesn't affect generated binary code.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r-- | gpsd.h-tail | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail index 2fa81e31..25b9e2ec 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -9,6 +9,7 @@ #include <stdint.h> #include <stdarg.h> #include "gps.h" +#include "compiler.h" /* * Tell GCC that we want thread-safe behavior with _REENTRANT; @@ -1016,11 +1017,7 @@ extern void libgps_dump_state(struct gps_data_t *); void gpsd_labeled_report(const int, const int, const char *, const char *, va_list); -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -__attribute__((__format__(__printf__, 3, 4))) void gpsd_report(const struct gpsd_errout_t *, const int, const char *, ...); -# else /* not a new enough GCC, use the unprotected prototype */ -void gpsd_report(const struct gpsd_errout_t *, const int, const char *, ...); -#endif +PRINTF_FUNC(3, 4) void gpsd_report(const struct gpsd_errout_t *, const int, const char *, ...); #ifdef S_SPLINT_S extern struct protoent *getprotobyname(const char *); |