X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fcompiler.h;h=8c2c3abd2ea6a808761eed046dce287f277ffaf9;hb=0cd6b6fde16c6e101d148a03b955ed1b0a1ef178;hp=44f22b39682a5656488126d86eef2ee5dad081b6;hpb=2322678e8fddbbf158b01b2720db2636404bba3b;p=pspp diff --git a/src/libpspp/compiler.h b/src/libpspp/compiler.h index 44f22b3968..8c2c3abd2e 100644 --- a/src/libpspp/compiler.h +++ b/src/libpspp/compiler.h @@ -44,4 +44,11 @@ #define MALLOC_LIKE #endif +/* This attribute was added in GCC 4.0. */ +#if __GNUC__ >= 4 +#define WARN_UNUSED_RESULT ATTRIBUTE ((warn_unused_result)) +#else +#define WARN_UNUSED_RESULT +#endif + #endif /* compiler.h */