mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
system.h: define ATTRIBUTE_WARN_UNUSED_RESULT
* src/system.h (ATTRIBUTE_WARN_UNUSED_RESULT): Define.
This commit is contained in:
1 parent
09fcf494a1
commit
61aae73f54
1 file changed
+8
@@ -483,6 +483,14 @@ enum
|
||||
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#endif
|
||||
|
||||
/* The warn_unused_result attribute appeared first in gcc-3.4.0 */
|
||||
#undef ATTRIBUTE_WARN_UNUSED_RESULT
|
||||
#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
|
||||
# define ATTRIBUTE_WARN_UNUSED_RESULT /* empty */
|
||||
#else
|
||||
# define ATTRIBUTE_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
|
||||
#endif
|
||||
|
||||
#if defined strdupa
|
||||
# define ASSIGN_STRDUPA(DEST, S) \
|
||||
do { DEST = strdupa (S); } while (0)
|
||||
|
||||
Reference in new issue
Block a user