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: replace a call to LERROR with lint...



details:   https://anonhg.NetBSD.org/src/rev/c324c7211fc9
branches:  trunk
changeset: 981602:c324c7211fc9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Mar 17 01:22:55 2021 +0000

description:
lint: replace a call to LERROR with lint_assert

No functional change.

diffstat:

 usr.bin/xlint/lint1/cgram.y |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 9e38a5467e18 -r c324c7211fc9 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Wed Mar 17 01:19:50 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Wed Mar 17 01:22:55 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.172 2021/03/17 01:19:50 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.173 2021/03/17 01:22:55 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.172 2021/03/17 01:19:50 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.173 2021/03/17 01:22:55 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -2162,7 +2162,8 @@
                }
                (void)declare_argument(decl, initflg);
                break;
-       case AUTO:
+       default:
+               lint_assert(dcs->d_ctx == AUTO);
                if (renaming != NULL) {
                        /* symbol renaming can't be used on automatic variables */
                        error(311);
@@ -2171,8 +2172,6 @@
                }
                declare_local(decl, initflg);
                break;
-       default:
-               LERROR("idecl(%d)", dcs->d_ctx);
        }
 
        if (initflg && !initerr)



Home | Main Index | Thread Index | Old Index