changeset 17732:6d92afe34a82

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 <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Wed, 30 Jul 2014 15:01:44 -0600
parents 6d5945b320ad
children 712a0a776487
files ChangeLog lib/openat-die.c modules/openat-die
diffstat 3 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 30 17:11:49 2014 -0600
+++ b/ChangeLog	Wed Jul 30 15:01:44 2014 -0600
@@ -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
--- a/lib/openat-die.c	Wed Jul 30 17:11:49 2014 -0600
+++ b/lib/openat-die.c	Wed Jul 30 15:01:44 2014 -0600
@@ -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 @@
    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
--- a/modules/openat-die	Wed Jul 30 17:11:49 2014 -0600
+++ b/modules/openat-die	Wed Jul 30 15:01:44 2014 -0600
@@ -9,6 +9,7 @@
 error
 exitfail
 gettext-h
+snippet/_Noreturn
 
 configure.ac: