[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6555: stat enhancement
From: |
Jim Meyering |
Subject: |
bug#6555: stat enhancement |
Date: |
Mon, 05 Jul 2010 17:41:43 +0200 |
Jim Meyering wrote:
> I'll push these two change-sets shortly.
>
> Subject: [PATCH 1/2] system.h: define ATTRIBUTE_WARN_UNUSED_RESULT
...
> +/* 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 __attribute__
> ((__warn_unused_result__))
> +#else
> +# define ATTRIBUTE_WARN_UNUSED_RESULT /* empty */
> +#endif
Just noticed I reversed the if/else branches above.
This works a lot better:
commit 61aae73f5427c987b20604fbec5772e02edc0f74
Author: Jim Meyering <address@hidden>
Date: Mon Jul 5 17:16:23 2010 +0200
system.h: define ATTRIBUTE_WARN_UNUSED_RESULT
* src/system.h (ATTRIBUTE_WARN_UNUSED_RESULT): Define.
diff --git a/src/system.h b/src/system.h
index 859b663..9e14681 100644
--- a/src/system.h
+++ b/src/system.h
@@ -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)
- bug#6555: stat enhancement, A Burgie, 2010/07/02
- bug#6555: stat enhancement, Pádraig Brady, 2010/07/05
- bug#6555: stat enhancement, Jim Meyering, 2010/07/05
- bug#6555: stat enhancement, A Burgie, 2010/07/05
- bug#6555: stat enhancement, Jim Meyering, 2010/07/05
- bug#6555: stat enhancement, A Burgie, 2010/07/05
- bug#6555: stat enhancement, Jim Meyering, 2010/07/05
- bug#6555: stat enhancement,
Jim Meyering <=
- bug#6555: stat enhancement, A Burgie, 2010/07/05
- bug#6555: stat enhancement, A Burgie, 2010/07/05
- bug#6555: stat enhancement, A Burgie, 2010/07/06
- bug#6555: stat enhancement, Pádraig Brady, 2010/07/06
- bug#6555: stat enhancement, Jim Meyering, 2010/07/06
- bug#6555: stat enhancement, A Burgie, 2010/07/06
- bug#6555: stat enhancement, Jim Meyering, 2010/07/07
- bug#6555: stat enhancement, A Burgie, 2010/07/07
- bug#6555: stat enhancement, A Burgie, 2010/07/15
- bug#6555: stat enhancement, Jim Meyering, 2010/07/07