Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint lint: clean up messages for internal errors



details:   https://anonhg.NetBSD.org/src/rev/7f5eb43a83de
branches:  trunk
changeset: 373032:7f5eb43a83de
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jan 14 09:30:07 2023 +0000

description:
lint: clean up messages for internal errors

diffstat:

 usr.bin/xlint/common/emit.c |  6 +++---
 usr.bin/xlint/lint2/emit2.c |  8 ++++----
 usr.bin/xlint/lint2/read.c  |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diffs (90 lines):

diff -r 4a9cf2347fb5 -r 7f5eb43a83de usr.bin/xlint/common/emit.c
--- a/usr.bin/xlint/common/emit.c       Sat Jan 14 09:21:58 2023 +0000
+++ b/usr.bin/xlint/common/emit.c       Sat Jan 14 09:30:07 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emit.c,v 1.17 2022/05/20 21:18:54 rillig Exp $ */
+/*     $NetBSD: emit.c,v 1.18 2023/01/14 09:30:07 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: emit.c,v 1.17 2022/05/20 21:18:54 rillig Exp $");
+__RCSID("$NetBSD: emit.c,v 1.18 2023/01/14 09:30:07 rillig Exp $");
 #endif
 
 #include <stdio.h>
@@ -112,7 +112,7 @@
                outchar('\n');
                sz = ob.o_next - ob.o_buf;
                if (sz > ob.o_len)
-                       errx(1, "internal error: outclr() 1");
+                       errx(1, "internal error: outclr");
                if (fwrite(ob.o_buf, sz, 1, lout) != 1)
                        err(1, "cannot write to %s", loname);
                ob.o_next = ob.o_buf;
diff -r 4a9cf2347fb5 -r 7f5eb43a83de usr.bin/xlint/lint2/emit2.c
--- a/usr.bin/xlint/lint2/emit2.c       Sat Jan 14 09:21:58 2023 +0000
+++ b/usr.bin/xlint/lint2/emit2.c       Sat Jan 14 09:30:07 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emit2.c,v 1.28 2022/05/20 21:18:55 rillig Exp $ */
+/* $NetBSD: emit2.c,v 1.29 2023/01/14 09:30:07 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: emit2.c,v 1.28 2022/05/20 21:18:55 rillig Exp $");
+__RCSID("$NetBSD: emit2.c,v 1.29 2023/01/14 09:30:07 rillig Exp $");
 #endif
 
 #include "lint2.h"
@@ -94,7 +94,7 @@
                                outchar('.');
                                outint(tp->t_uniqpos.p_uniq);
                        } else
-                               errx(1, "internal error: outtype() 2");
+                               errx(1, "internal error: outtype");
                } else if (ts == FUNC && tp->t_args != NULL) {
                        na = 0;
                        for (ap = tp->t_args; *ap != NULL; ap++)
@@ -189,7 +189,7 @@
                        def = sym;
        }
        if (def == NULL)
-               errx(1, "internal error: dumpname() %s", hte->h_name);
+               errx(1, "internal error: dumpname %s", hte->h_name);
 
        outdef(hte, def);
 }
diff -r 4a9cf2347fb5 -r 7f5eb43a83de usr.bin/xlint/lint2/read.c
--- a/usr.bin/xlint/lint2/read.c        Sat Jan 14 09:21:58 2023 +0000
+++ b/usr.bin/xlint/lint2/read.c        Sat Jan 14 09:30:07 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: read.c,v 1.77 2023/01/13 19:50:00 rillig Exp $ */
+/* $NetBSD: read.c,v 1.78 2023/01/14 09:30:07 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: read.c,v 1.77 2023/01/13 19:50:00 rillig Exp $");
+__RCSID("$NetBSD: read.c,v 1.78 2023/01/14 09:30:07 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -305,7 +305,7 @@
         * file by lint1 are always the previous index + 1.
         */
        if ((size_t)fid >= ninpfns)
-               errx(1, "internal error: setfnid()");
+               errx(1, "internal error: setfnid");
        inpfns[fid] = (unsigned short)getfnidx(cp);
 }
 



Home | Main Index | Thread Index | Old Index