diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-06-22 14:06:33 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-06-22 14:06:33 -0700 |
commit | 94bf5a24bf7c9c959ad90821655d2b68c92ef32f (patch) | |
tree | e5498e4298be3fe2083d3577b3baedee025a7d50 /machdep.c | |
parent | 85f8a9984983e54503c408166c78d256690dcd29 (diff) | |
download | tcpdump-94bf5a24bf7c9c959ad90821655d2b68c92ef32f.tar.gz |
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.
They also support the "noreturn" attribute, but don't allow it to be
applied to function pointers, only to functions.
Check whether they can be used without warnings, and use them only if
they can.
Diffstat (limited to 'machdep.c')
-rw-r--r-- | machdep.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -46,7 +46,10 @@ static const char rcsid[] _U_ = #if !defined(HAVE_SNPRINTF) int snprintf(char *, size_t, const char *, ...) - __attribute__((format(printf, 3, 4))); +#ifdef __ATTRIBUTE___FORMAT_OK + __attribute__((format(printf, 3, 4))) +#endif /* __ATTRIBUTE___FORMAT_OK */ + ; #endif /* !defined(HAVE_SNPRINTF) */ #endif /* __osf__ */ |