Module Name:    src
Committed By:   rillig
Date:           Sat Dec  4 00:01:24 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: msg_123.c msg_123.exp
        src/usr.bin/xlint/lint1: err.c tree.c

Log Message:
lint: add quotes around placeholders in message 123


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_123.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_123.exp
cvs rdiff -u -r1.147 -r1.148 src/usr.bin/xlint/lint1/err.c
cvs rdiff -u -r1.395 -r1.396 src/usr.bin/xlint/lint1/tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_123.c
diff -u src/tests/usr.bin/xlint/lint1/msg_123.c:1.3 src/tests/usr.bin/xlint/lint1/msg_123.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_123.c:1.3	Mon Aug 16 18:51:58 2021
+++ src/tests/usr.bin/xlint/lint1/msg_123.c	Sat Dec  4 00:01:24 2021
@@ -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 @@ compare(_Bool b, int i, double d, const 
 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;
 }

Index: src/tests/usr.bin/xlint/lint1/msg_123.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_123.exp:1.4 src/tests/usr.bin/xlint/lint1/msg_123.exp:1.5
--- src/tests/usr.bin/xlint/lint1/msg_123.exp:1.4	Mon Aug 16 18:51:58 2021
+++ src/tests/usr.bin/xlint/lint1/msg_123.exp	Sat Dec  4 00:01:24 2021
@@ -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]

Index: src/usr.bin/xlint/lint1/err.c
diff -u src/usr.bin/xlint/lint1/err.c:1.147 src/usr.bin/xlint/lint1/err.c:1.148
--- src/usr.bin/xlint/lint1/err.c:1.147	Sat Oct 30 22:04:42 2021
+++ src/usr.bin/xlint/lint1/err.c	Sat Dec  4 00:01:24 2021
@@ -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 @@ const char *const msgs[] = {
 	"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 */

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.395 src/usr.bin/xlint/lint1/tree.c:1.396
--- src/usr.bin/xlint/lint1/tree.c:1.395	Tue Nov 16 21:01:05 2021
+++ src/usr.bin/xlint/lint1/tree.c	Sat Dec  4 00:01:24 2021
@@ -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 @@ typeok_compare(op_t op,
 
 	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 @@ typeok_colon(const mod_t *mp,
 	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 @@ check_assign_pointer_integer(op_t op, in
 		    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;

Reply via email to