Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/lint2 lint: sort the lint2 diagnostics by symb...



details:   https://anonhg.NetBSD.org/src/rev/d6859ca01188
branches:  trunk
changeset: 1023185:d6859ca01188
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 28 19:49:28 2021 +0000

description:
lint: sort the lint2 diagnostics by symbol name

diffstat:

 tests/usr.bin/xlint/lint2/output_sorted.exp |  12 ++++++------
 usr.bin/xlint/lint2/main2.c                 |   7 +++----
 2 files changed, 9 insertions(+), 10 deletions(-)

diffs (54 lines):

diff -r ec6afdbd172f -r d6859ca01188 tests/usr.bin/xlint/lint2/output_sorted.exp
--- a/tests/usr.bin/xlint/lint2/output_sorted.exp       Sat Aug 28 19:45:18 2021 +0000
+++ b/tests/usr.bin/xlint/lint2/output_sorted.exp       Sat Aug 28 19:49:28 2021 +0000
@@ -1,12 +1,6 @@
-func7000 used( output_sorted.c(10) ), but not defined
-func7000, arg 1 used inconsistently    output_sorted.c(10)[int]  ::  output_sorted.c(11)[pointer to const char]
-func7000, arg 2 used inconsistently    output_sorted.c(10)[pointer to const char]  ::  output_sorted.c(11)[double]
 func0000 used( output_sorted.c(10) ), but not defined
 func0000, arg 1 used inconsistently    output_sorted.c(10)[int]  ::  output_sorted.c(11)[pointer to const char]
 func0000, arg 2 used inconsistently    output_sorted.c(10)[pointer to const char]  ::  output_sorted.c(11)[double]
-no_prototype used( output_sorted.c(10) ), but not defined
-no_prototype, arg 1 used inconsistently        output_sorted.c(10)[int]  ::  output_sorted.c(11)[pointer to const char]
-no_prototype, arg 2 used inconsistently        output_sorted.c(10)[pointer to const char]  ::  output_sorted.c(11)[double]
 func1000 used( output_sorted.c(10) ), but not defined
 func1000, arg 1 used inconsistently    output_sorted.c(10)[int]  ::  output_sorted.c(11)[pointer to const char]
 func1000, arg 2 used inconsistently    output_sorted.c(10)[pointer to const char]  ::  output_sorted.c(11)[double]
@@ -25,3 +19,9 @@
 func6000 used( output_sorted.c(10) ), but not defined
 func6000, arg 1 used inconsistently    output_sorted.c(10)[int]  ::  output_sorted.c(11)[pointer to const char]
 func6000, arg 2 used inconsistently    output_sorted.c(10)[pointer to const char]  ::  output_sorted.c(11)[double]
+func7000 used( output_sorted.c(10) ), but not defined
+func7000, arg 1 used inconsistently    output_sorted.c(10)[int]  ::  output_sorted.c(11)[pointer to const char]
+func7000, arg 2 used inconsistently    output_sorted.c(10)[pointer to const char]  ::  output_sorted.c(11)[double]
+no_prototype used( output_sorted.c(10) ), but not defined
+no_prototype, arg 1 used inconsistently        output_sorted.c(10)[int]  ::  output_sorted.c(11)[pointer to const char]
+no_prototype, arg 2 used inconsistently        output_sorted.c(10)[pointer to const char]  ::  output_sorted.c(11)[double]
diff -r ec6afdbd172f -r d6859ca01188 usr.bin/xlint/lint2/main2.c
--- a/usr.bin/xlint/lint2/main2.c       Sat Aug 28 19:45:18 2021 +0000
+++ b/usr.bin/xlint/lint2/main2.c       Sat Aug 28 19:49:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main2.c,v 1.20 2021/08/28 17:11:19 rillig Exp $        */
+/*     $NetBSD: main2.c,v 1.21 2021/08/28 19:49:28 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: main2.c,v 1.20 2021/08/28 17:11:19 rillig Exp $");
+__RCSID("$NetBSD: main2.c,v 1.21 2021/08/28 19:49:28 rillig Exp $");
 #endif
 
 #include <stdio.h>
@@ -187,8 +187,7 @@
        mainused();
 
        /* perform all tests */
-       /* TODO: sort the names; hashcode order looks chaotic. */
-       symtab_forall(check_name);
+       symtab_forall_sorted(check_name);
 
        exit(0);
        /* NOTREACHED */



Home | Main Index | Thread Index | Old Index