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 placeholders in ...



details:   https://anonhg.NetBSD.org/src/rev/bf337b66a1fe
branches:  trunk
changeset: 1026646:bf337b66a1fe
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Dec 04 00:01:24 2021 +0000

description:
lint: add quotes around placeholders in message 123

diffstat:

 tests/usr.bin/xlint/lint1/msg_123.c   |   8 ++++----
 tests/usr.bin/xlint/lint1/msg_123.exp |  12 ++++++------
 usr.bin/xlint/lint1/err.c             |   6 +++---
 usr.bin/xlint/lint1/tree.c            |  10 +++++-----
 4 files changed, 18 insertions(+), 18 deletions(-)

diffs (114 lines):

diff -r 73f38033cb57 -r bf337b66a1fe tests/usr.bin/xlint/lint1/msg_123.c
--- a/tests/usr.bin/xlint/lint1/msg_123.c       Fri Dec 03 23:37:30 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_123.c       Sat Dec 04 00:01:24 2021 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: msg_123.c,v 1.3 2021/08/16 18:51:58 rillig Exp $       */
+/*     $NetBSD: msg_123.c,v 1.4 2021/12/04 00:01:24 rillig Exp $       */
 # 3 "msg_123.c"
 
-// Test for message: illegal combination of %s (%s) and %s (%s), op %s [123]
+// Test for message: illegal combination of %s '%s' and %s '%s', op '%s' [123]
 
 void ok(_Bool);
 void bad(_Bool);
@@ -30,8 +30,8 @@
 void
 cover_check_assign_types_compatible(int *int_pointer, int i)
 {
-       /* expect+1: warning: illegal combination of pointer (pointer to int) and integer (int), op = [123] */
+       /* expect+1: warning: illegal combination of pointer 'pointer to int' and integer 'int', op '=' [123] */
        int_pointer = i;
-       /* expect+1: warning: illegal combination of integer (int) and pointer (pointer to int), op = [123] */
+       /* expect+1: warning: illegal combination of integer 'int' and pointer 'pointer to int', op '=' [123] */
        i = int_pointer;
 }
diff -r 73f38033cb57 -r bf337b66a1fe tests/usr.bin/xlint/lint1/msg_123.exp
--- a/tests/usr.bin/xlint/lint1/msg_123.exp     Fri Dec 03 23:37:30 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_123.exp     Sat Dec 04 00:01:24 2021 +0000
@@ -1,8 +1,8 @@
-msg_123.c(15): warning: illegal combination of integer (_Bool) and pointer (pointer to const char), op < [123]
-msg_123.c(19): warning: illegal combination of integer (int) and pointer (pointer to const char), op < [123]
+msg_123.c(15): warning: illegal combination of integer '_Bool' and pointer 'pointer to const char', op '<' [123]
+msg_123.c(19): warning: illegal combination of integer 'int' and pointer 'pointer to const char', op '<' [123]
 msg_123.c(23): error: operands of '<' have incompatible types (double != pointer) [107]
-msg_123.c(24): warning: illegal combination of pointer (pointer to const char) and integer (_Bool), op < [123]
-msg_123.c(25): warning: illegal combination of pointer (pointer to const char) and integer (int), op < [123]
+msg_123.c(24): warning: illegal combination of pointer 'pointer to const char' and integer '_Bool', op '<' [123]
+msg_123.c(25): warning: illegal combination of pointer 'pointer to const char' and integer 'int', op '<' [123]
 msg_123.c(26): error: operands of '<' have incompatible types (pointer != double) [107]
-msg_123.c(34): warning: illegal combination of pointer (pointer to int) and integer (int), op = [123]
-msg_123.c(36): warning: illegal combination of integer (int) and pointer (pointer to int), op = [123]
+msg_123.c(34): warning: illegal combination of pointer 'pointer to int' and integer 'int', op '=' [123]
+msg_123.c(36): warning: illegal combination of integer 'int' and pointer 'pointer to int', op '=' [123]
diff -r 73f38033cb57 -r bf337b66a1fe usr.bin/xlint/lint1/err.c
--- a/usr.bin/xlint/lint1/err.c Fri Dec 03 23:37:30 2021 +0000
+++ b/usr.bin/xlint/lint1/err.c Sat Dec 04 00:01:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: err.c,v 1.147 2021/10/30 22:04:42 rillig Exp $ */
+/*     $NetBSD: err.c,v 1.148 2021/12/04 00:01:24 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.147 2021/10/30 22:04:42 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.148 2021/12/04 00:01:24 rillig Exp $");
 #endif
 
 #include <sys/types.h>
@@ -177,7 +177,7 @@
        "bitwise '%s' on signed value nonportable",                   /* 120 */
        "negative shift",                                             /* 121 */
        "shift amount %llu is greater than bit-size %llu of '%s'",    /* 122 */
-       "illegal combination of %s (%s) and %s (%s), op %s",          /* 123 */
+       "illegal combination of %s '%s' and %s '%s', op '%s'",        /* 123 */
        "illegal combination of '%s' and '%s', op '%s'",              /* 124 */
        "ANSI C forbids ordered comparisons of pointers to functions",/* 125 */
        "incompatible types '%s' and '%s' in conditional",            /* 126 */
diff -r 73f38033cb57 -r bf337b66a1fe usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Fri Dec 03 23:37:30 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Sat Dec 04 00:01:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.395 2021/11/16 21:01:05 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.396 2021/12/04 00:01:24 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.395 2021/11/16 21:01:05 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.396 2021/12/04 00:01:24 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -1039,7 +1039,7 @@
 
        lx = lt == PTR ? "pointer" : "integer";
        rx = rt == PTR ? "pointer" : "integer";
-       /* illegal combination of %s (%s) and %s (%s), op %s */
+       /* illegal combination of %s '%s' and %s '%s', op '%s' */
        warning(123, lx, type_name(ltp), rx, type_name(rtp), op_name(op));
        return true;
 }
@@ -1103,7 +1103,7 @@
        if ((lt == PTR && is_integer(rt)) || (is_integer(lt) && rt == PTR)) {
                const char *lx = lt == PTR ? "pointer" : "integer";
                const char *rx = rt == PTR ? "pointer" : "integer";
-               /* illegal combination of %s (%s) and %s (%s), op %s */
+               /* illegal combination of %s '%s' and %s '%s', op '%s' */
                warning(123, lx, type_name(ltp),
                    rx, type_name(rtp), mp->m_name);
                return true;
@@ -1572,7 +1572,7 @@
                    lx, type_name(ltp), rx, type_name(rtp), arg);
                break;
        default:
-               /* illegal combination of %s (%s) and %s (%s), op %s */
+               /* illegal combination of %s '%s' and %s '%s', op '%s' */
                warning(123,
                    lx, type_name(ltp), rx, type_name(rtp), op_name(op));
                break;



Home | Main Index | Thread Index | Old Index