Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: use standard function attribute fo...



details:   https://anonhg.NetBSD.org/src/rev/8778f1422e7a
branches:  trunk
changeset: 378271:8778f1422e7a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 29 06:44:44 2023 +0000

description:
lint: use standard function attribute for noreturn functions

diffstat:

 usr.bin/xlint/lint1/externs1.h |  5 ++---
 usr.bin/xlint/lint1/main1.c    |  8 ++++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diffs (55 lines):

diff -r 99647b416481 -r 8778f1422e7a usr.bin/xlint/lint1/externs1.h
--- a/usr.bin/xlint/lint1/externs1.h    Sat Jul 29 04:06:32 2023 +0000
+++ b/usr.bin/xlint/lint1/externs1.h    Sat Jul 29 06:44:44 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: externs1.h,v 1.199 2023/07/28 21:50:03 rillig Exp $    */
+/*     $NetBSD: externs1.h,v 1.200 2023/07/29 06:44:44 rillig Exp $    */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -184,8 +184,7 @@ bool        gnuism(int, ...);
 void   c99ism(int, ...);
 void   c11ism(int, ...);
 void   c23ism(int, ...);
-void   assert_failed(const char *, int, const char *, const char *)
-               __attribute__((__noreturn__));
+void   assert_failed(const char *, int, const char *, const char *) __dead;
 void   update_location(const char *, int, bool, bool);
 void   suppress_messages(const char *);
 
diff -r 99647b416481 -r 8778f1422e7a usr.bin/xlint/lint1/main1.c
--- a/usr.bin/xlint/lint1/main1.c       Sat Jul 29 04:06:32 2023 +0000
+++ b/usr.bin/xlint/lint1/main1.c       Sat Jul 29 06:44:44 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main1.c,v 1.74 2023/07/13 08:40:38 rillig Exp $        */
+/*     $NetBSD: main1.c,v 1.75 2023/07/29 06:44:44 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: main1.c,v 1.74 2023/07/13 08:40:38 rillig Exp $");
+__RCSID("$NetBSD: main1.c,v 1.75 2023/07/29 06:44:44 rillig Exp $");
 #endif
 
 #include <sys/types.h>
@@ -261,7 +261,7 @@ main(int argc, char *argv[])
        return seen_error || (wflag && seen_warning) ? 1 : 0;
 }
 
-static void __attribute__((noreturn))
+static void __dead
 usage(void)
 {
        (void)fprintf(stderr,
@@ -272,7 +272,7 @@ usage(void)
        exit(1);
 }
 
-void __attribute__((noreturn))
+void __dead
 norecover(void)
 {
        /* cannot recover from previous errors */



Home | Main Index | Thread Index | Old Index