When using an old gnu compiler, with all warnings displayed, the define
checkreturn __attribute__((warn_unused_result)) is not supported. It generates
following messages during compilation:
warning: `warn_unused_result' attribute directive ignored
To solve this, please introduce additional conditions around checkreturn
definition like:
/* 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
/* Verify that we remember to check all return values for proper error propagation */
#define checkreturn __attribute__((warn_unused_result))
#endif
Original issue reported on code.google.com by cea.max....@gmail.com on 9 Aug 2012 at 6:20
Original issue reported on code.google.com by
cea.max....@gmail.com
on 9 Aug 2012 at 6:20