From: Eric Blake Date: Wed, 30 Jul 2014 21:01:44 +0000 (-0600) Subject: openat-die: use _Noreturn markup X-Git-Tag: v1.0~7326 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a5f2a6d5c1682ea432e703ab30f82071b30ab30a;p=gnulib.git openat-die: use _Noreturn markup Compiling coreutils.git on cygwin with gcc 4.8.3, I got: lib/openat-die.c:34:1: error: function might be candidate for attribute 'noreturn' [-Werror=suggest-attribute=noreturn] openat_save_fail (int errnum) ^ * modules/openat-die (Depends-on): Add snippet/_Noreturn. * lib/openat-die.c (openat_save_fail, openat_restore_fail): Mark _Noreturn. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index f4d90224ee..1fbf438015 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-07-31 Eric Blake + + openat-die: use _Noreturn markup + * modules/openat-die (Depends-on): Add snippet/_Noreturn. + * lib/openat-die.c (openat_save_fail, openat_restore_fail): Mark + _Noreturn. + 2014-07-30 Eric Blake test-open: port to cygwin, which lacks Fortify diff --git a/lib/openat-die.c b/lib/openat-die.c index 02f1fd7de4..b61152618f 100644 --- a/lib/openat-die.c +++ b/lib/openat-die.c @@ -30,7 +30,7 @@ #include "gettext.h" #define _(msgid) gettext (msgid) -void +_Noreturn void openat_save_fail (int errnum) { #ifndef GNULIB_LIBPOSIX @@ -49,7 +49,7 @@ openat_save_fail (int errnum) during an openat emulation. The caller must ensure that fd 2 is not a just-opened fd, even when openat_safer is not in use. */ -void +_Noreturn void openat_restore_fail (int errnum) { #ifndef GNULIB_LIBPOSIX diff --git a/modules/openat-die b/modules/openat-die index 08bef776f6..c5f9af2d75 100644 --- a/modules/openat-die +++ b/modules/openat-die @@ -9,6 +9,7 @@ openat-h error exitfail gettext-h +snippet/_Noreturn configure.ac: