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: add quotes around placeholder in m...



details:   https://anonhg.NetBSD.org/src/rev/a8e9bbefb1f8
branches:  trunk
changeset: 960698:a8e9bbefb1f8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Mar 26 23:17:33 2021 +0000

description:
lint: add quotes around placeholder in message about undefined variable

Before: error: expected undefined [99]
After:  error: 'expected' undefined [99]

Seen in external/mpl/bind, which for Clang defines in stdatomic.h:
> #define atomic_exchange_explicit(obj, desired, order) \
>     __c11_atomic_exchange_explicit(obj, expected, order)
Note the mismatch between 'desired' and 'expected'.

diffstat:

 tests/usr.bin/xlint/lint1/d_pr_22119.c   |  4 ++--
 tests/usr.bin/xlint/lint1/d_pr_22119.exp |  2 +-
 tests/usr.bin/xlint/lint1/msg_099.c      |  4 ++--
 tests/usr.bin/xlint/lint1/msg_099.exp    |  2 +-
 usr.bin/xlint/lint1/err.c                |  6 +++---
 usr.bin/xlint/lint1/tree.c               |  6 +++---
 6 files changed, 12 insertions(+), 12 deletions(-)

diffs (96 lines):

diff -r 71ff894f58a9 -r a8e9bbefb1f8 tests/usr.bin/xlint/lint1/d_pr_22119.c
--- a/tests/usr.bin/xlint/lint1/d_pr_22119.c    Fri Mar 26 22:33:54 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_pr_22119.c    Fri Mar 26 23:17:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: d_pr_22119.c,v 1.1 2021/02/28 22:12:16 rillig Exp $    */
+/*     $NetBSD: d_pr_22119.c,v 1.2 2021/03/26 23:17:33 rillig Exp $    */
 # 3 "d_pr_22119.c"
 
 /*
@@ -13,6 +13,6 @@
 {
        void (*f1)(void);
 
-       f1 = (void (*)(void))p;         /* expect: p undefined [99] */
+       f1 = (void (*)(void))p;         /* expect: 'p' undefined [99] */
        f1 = (void *()(void))p;         /* crash before 2021-02-28 */
 }
diff -r 71ff894f58a9 -r a8e9bbefb1f8 tests/usr.bin/xlint/lint1/d_pr_22119.exp
--- a/tests/usr.bin/xlint/lint1/d_pr_22119.exp  Fri Mar 26 22:33:54 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_pr_22119.exp  Fri Mar 26 23:17:33 2021 +0000
@@ -1,1 +1,1 @@
-d_pr_22119.c(16): error: p undefined [99]
+d_pr_22119.c(16): error: 'p' undefined [99]
diff -r 71ff894f58a9 -r a8e9bbefb1f8 tests/usr.bin/xlint/lint1/msg_099.c
--- a/tests/usr.bin/xlint/lint1/msg_099.c       Fri Mar 26 22:33:54 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_099.c       Fri Mar 26 23:17:33 2021 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: msg_099.c,v 1.3 2021/01/31 11:12:07 rillig Exp $       */
+/*     $NetBSD: msg_099.c,v 1.4 2021/03/26 23:17:33 rillig Exp $       */
 # 3 "msg_099.c"
 
-// Test for message: %s undefined [99]
+// Test for message: '%s' undefined [99]
 
 void
 example(int defined_variable)
diff -r 71ff894f58a9 -r a8e9bbefb1f8 tests/usr.bin/xlint/lint1/msg_099.exp
--- a/tests/usr.bin/xlint/lint1/msg_099.exp     Fri Mar 26 22:33:54 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_099.exp     Fri Mar 26 23:17:33 2021 +0000
@@ -1,1 +1,1 @@
-msg_099.c(10): error: undefined_variable undefined [99]
+msg_099.c(10): error: 'undefined_variable' undefined [99]
diff -r 71ff894f58a9 -r a8e9bbefb1f8 usr.bin/xlint/lint1/err.c
--- a/usr.bin/xlint/lint1/err.c Fri Mar 26 22:33:54 2021 +0000
+++ b/usr.bin/xlint/lint1/err.c Fri Mar 26 23:17:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: err.c,v 1.94 2021/03/26 21:05:27 rillig Exp $  */
+/*     $NetBSD: err.c,v 1.95 2021/03/26 23:17:33 rillig Exp $  */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: err.c,v 1.94 2021/03/26 21:05:27 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.95 2021/03/26 23:17:33 rillig Exp $");
 #endif
 
 #include <sys/types.h>
@@ -153,7 +153,7 @@
        "cannot dereference non-pointer type",                        /* 96 */
        "suffix U is illegal in traditional C",                       /* 97 */
        "suffixes F and L are illegal in traditional C",              /* 98 */
-       "%s undefined",                                               /* 99 */
+       "'%s' undefined",                                             /* 99 */
        "unary + is illegal in traditional C",                        /* 100 */
        "undefined struct/union member: %s",                          /* 101 */
        "illegal member use: %s",                                     /* 102 */
diff -r 71ff894f58a9 -r a8e9bbefb1f8 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Fri Mar 26 22:33:54 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Fri Mar 26 23:17:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.250 2021/03/26 20:31:07 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.251 2021/03/26 23:17:33 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.250 2021/03/26 20:31:07 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.251 2021/03/26 23:17:33 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -246,7 +246,7 @@
                return;
        }
 
-       /* %s undefined */
+       /* '%s' undefined */
        error(99, sym->s_name);
 }
 



Home | Main Index | Thread Index | Old Index