diff options
Diffstat (limited to 'pb_decode.c')
-rw-r--r-- | pb_decode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pb_decode.c b/pb_decode.c index 6d3a0b6c..5ef40ecc 100644 --- a/pb_decode.c +++ b/pb_decode.c @@ -3,12 +3,12 @@ * 2011 Petteri Aimonen <jpa@kapsi.fi> */ - -#ifdef __GNUC__ -/* Verify that we remember to check all return values for proper error propagation */ -#define checkreturn __attribute__((warn_unused_result)) +/* The warn_unused_result attribute appeared first in gcc-3.4.0 */ +#if !defined(__GNUC__) || ( __GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) + #define checkreturn #else -#define checkreturn + /* Verify that we remember to check all return values for proper error propagation */ + #define checkreturn __attribute__((warn_unused_result)) #endif #include "pb.h" |