]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
src: fix noreturn-related warning
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 18 Oct 2019 10:22:06 +0000 (13:22 +0300)
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 18 Oct 2019 10:22:06 +0000 (13:22 +0300)
Recent autogen started adding '#include <stdnoreturn.h>' into -args.h
files. However in GnuTLS tools code this results in the following
warnings, because stdnoreturn.h unconditionally redefines 'noreturn' to
_Noreturn:

warning: '_Noreturn' attribute directive ignored

Use __noreturn__ attribute instead as does Gnulib.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
src/certtool-common.h
src/serv.c

index a4b4c5867f1a082e57c398d210c73fbe35370e3c..7217e69dec73085731f2b556a4739e8622d875be 100644 (file)
@@ -113,7 +113,7 @@ const char *get_pass(void);
 const char *get_confirmed_pass(bool empty_ok);
 void app_exit(int val)
 #ifdef __GNUC__
-__attribute__ ((noreturn))
+__attribute__ ((__noreturn__))
 #endif
 ;
 int cipher_to_flags(const char *cipher);
index 60b02f69836a0ac6b2fc97ff6206d4d9ab166baa..64ee8f4e018ce6214ac0800e387167e6720844e8 100644 (file)
@@ -1070,7 +1070,7 @@ get_response(gnutls_session_t session, char *request,
        *response_length = ((*response) ? strlen(*response) : 0);
 }
 
-static void terminate(int sig) __attribute__ ((noreturn));
+static void terminate(int sig) __attribute__ ((__noreturn__));
 
 static void terminate(int sig)
 {