]> Savannah Git Hosting - gnulib.git/commitdiff
openat-die: use _Noreturn markup
authorEric Blake <eblake@redhat.com>
Wed, 30 Jul 2014 21:01:44 +0000 (15:01 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 31 Jul 2014 16:47:26 +0000 (10:47 -0600)
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 <eblake@redhat.com>
ChangeLog
lib/openat-die.c
modules/openat-die

index f4d90224eebcc70bb1f9fe7fe29c6c222eb39e6c..1fbf438015bc10b35dc9e4bcb3506ae251cd4888 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-07-31  Eric Blake  <eblake@redhat.com>
+
+       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  <eblake@redhat.com>
 
        test-open: port to cygwin, which lacks Fortify
index 02f1fd7de483e75dfdab7118f9f9b153c09d13c5..b61152618f694c314b0e9d04d25345dfd46bac0b 100644 (file)
@@ -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
index 08bef776f6a008c3c7caaa8b650b9fe4824f710c..c5f9af2d75d008ca031d9a41eedcf9e55ab4bf13 100644 (file)
@@ -9,6 +9,7 @@ openat-h
 error
 exitfail
 gettext-h
+snippet/_Noreturn
 
 configure.ac: