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: reword message about constant argu...



details:   https://anonhg.NetBSD.org/src/rev/8952c1481360
branches:  trunk
changeset: 960928:8952c1481360
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Apr 02 22:41:53 2021 +0000

description:
lint: reword message about constant argument to '!'

In the other messages, operators are typically written in their literal
form as well.  Using single quotes disambiguates them from normal
punctuation.

diffstat:

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

diffs (92 lines):

diff -r c4ae5981ca9f -r 8952c1481360 tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp
--- a/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp   Fri Apr 02 22:38:42 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp   Fri Apr 02 22:41:53 2021 +0000
@@ -64,9 +64,9 @@
 d_c99_bool_strict.c(392): error: controlling expression must be bool, not 'double' [333]
 d_c99_bool_strict.c(398): error: controlling expression must be bool, not 'pointer' [333]
 d_c99_bool_strict.c(419): warning: constant in conditional context [161]
-d_c99_bool_strict.c(419): warning: constant argument to NOT [239]
+d_c99_bool_strict.c(419): warning: constant argument to '!' [239]
 d_c99_bool_strict.c(420): warning: constant in conditional context [161]
-d_c99_bool_strict.c(420): warning: constant argument to NOT [239]
+d_c99_bool_strict.c(420): warning: constant argument to '!' [239]
 d_c99_bool_strict.c(424): error: operand of '!' must be bool, not 'int' [330]
 d_c99_bool_strict.c(425): error: operand of '!' must be bool, not 'int' [330]
 d_c99_bool_strict.c(426): error: operand of '!' must be bool, not 'int' [330]
diff -r c4ae5981ca9f -r 8952c1481360 tests/usr.bin/xlint/lint1/msg_239.c
--- a/tests/usr.bin/xlint/lint1/msg_239.c       Fri Apr 02 22:38:42 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_239.c       Fri Apr 02 22:41:53 2021 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: msg_239.c,v 1.3 2021/04/02 22:38:42 rillig Exp $       */
+/*     $NetBSD: msg_239.c,v 1.4 2021/04/02 22:41:54 rillig Exp $       */
 # 3 "msg_239.c"
 
-// Test for message: constant argument to NOT [239]
+// Test for message: constant argument to '!' [239]
 
 /* lint1-extra-flags: -h */
 
diff -r c4ae5981ca9f -r 8952c1481360 tests/usr.bin/xlint/lint1/msg_239.exp
--- a/tests/usr.bin/xlint/lint1/msg_239.exp     Fri Apr 02 22:38:42 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_239.exp     Fri Apr 02 22:41:53 2021 +0000
@@ -1,4 +1,4 @@
 msg_239.c(13): warning: constant in conditional context [161]
-msg_239.c(13): warning: constant argument to NOT [239]
+msg_239.c(13): warning: constant argument to '!' [239]
 msg_239.c(14): warning: constant in conditional context [161]
-msg_239.c(14): warning: constant argument to NOT [239]
+msg_239.c(14): warning: constant argument to '!' [239]
diff -r c4ae5981ca9f -r 8952c1481360 usr.bin/xlint/lint1/err.c
--- a/usr.bin/xlint/lint1/err.c Fri Apr 02 22:38:42 2021 +0000
+++ b/usr.bin/xlint/lint1/err.c Fri Apr 02 22:41:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: err.c,v 1.100 2021/04/02 12:16:50 rillig Exp $ */
+/*     $NetBSD: err.c,v 1.101 2021/04/02 22:41:53 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.100 2021/04/02 12:16:50 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.101 2021/04/02 22:41:53 rillig Exp $");
 #endif
 
 #include <sys/types.h>
@@ -293,7 +293,7 @@
        "static function %s unused",                                  /* 236 */
        "redeclaration of formal parameter %s",                       /* 237 */
        "initialization of union is illegal in traditional C",        /* 238 */
-       "constant argument to NOT",                                   /* 239 */
+       "constant argument to '!'",                                   /* 239 */
        "assignment of different structures (%s != %s)",              /* 240 */
        "dubious operation on enum, op %s",                           /* 241 */
        "combination of '%s' and '%s', op %s",                        /* 242 */
diff -r c4ae5981ca9f -r 8952c1481360 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Fri Apr 02 22:38:42 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Fri Apr 02 22:41:53 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.264 2021/04/02 17:10:52 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.265 2021/04/02 22:41:53 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.264 2021/04/02 17:10:52 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.265 2021/04/02 22:41:53 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -3208,7 +3208,7 @@
        switch (tn->tn_op) {
        case NOT:
                if (hflag && !constcond_flag)
-                       /* constant argument to NOT */
+                       /* constant argument to '!' */
                        warning(239);
                v->v_quad = !l ? 1 : 0;
                break;



Home | Main Index | Thread Index | Old Index