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: extend a few message comments



details:   https://anonhg.NetBSD.org/src/rev/251a9e54ff7a
branches:  trunk
changeset: 949824:251a9e54ff7a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 17 16:25:30 2021 +0000

description:
lint: extend a few message comments

diffstat:

 usr.bin/xlint/lint1/decl.c  |   8 ++++----
 usr.bin/xlint/lint1/lint1.h |   4 ++--
 usr.bin/xlint/lint1/tree.c  |  13 ++++++-------
 3 files changed, 12 insertions(+), 13 deletions(-)

diffs (116 lines):

diff -r 753ca867f5ba -r 251a9e54ff7a usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Sun Jan 17 16:19:54 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Sun Jan 17 16:25:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.126 2021/01/17 15:24:03 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.127 2021/01/17 16:25:30 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.126 2021/01/17 15:24:03 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.127 2021/01/17 16:25:30 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -406,7 +406,7 @@
        case LONG:
                if (t2 == INT || t2 == UINT || t2 == LONG || t2 == ULONG ||
                    t2 == FLOAT || t2 == DOUBLE || t2 == DCOMPLEX) {
-                       /* modifying typedef with ... */
+                       /* modifying typedef with '%s'; only qualifiers ... */
                        warning(5, "long");
                        if (t2 == INT) {
                                td = gettyp(LONG);
@@ -826,7 +826,7 @@
                }
        } else if (dcs->d_ctx == ARG || dcs->d_ctx == PARG) {
                if (scl != NOSCL && scl != REG) {
-                       /* only register valid ... */
+                       /* only register valid as formal parameter storage... */
                        error(9);
                        scl = NOSCL;
                }
diff -r 753ca867f5ba -r 251a9e54ff7a usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h       Sun Jan 17 16:19:54 2021 +0000
+++ b/usr.bin/xlint/lint1/lint1.h       Sun Jan 17 16:25:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.57 2021/01/16 16:53:23 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.58 2021/01/17 16:25:30 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -154,7 +154,7 @@
        bool    t_const : 1;    /* const modifier */
        bool    t_volatile : 1; /* volatile modifier */
        bool    t_proto : 1;    /* function prototype (t_args valid) */
-       bool    t_vararg : 1;   /* prototype with ... */
+       bool    t_vararg : 1;   /* prototype with '...' */
        bool    t_typedef : 1;  /* type defined with typedef */
        bool    t_bitfield : 1;
        bool    t_isenum : 1;   /* type is (or was) enum (t_enum valid) */
diff -r 753ca867f5ba -r 251a9e54ff7a usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Sun Jan 17 16:19:54 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Sun Jan 17 16:25:30 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.176 2021/01/17 16:19:54 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.177 2021/01/17 16:25:30 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.176 2021/01/17 16:19:54 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.177 2021/01/17 16:25:30 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -464,7 +464,6 @@
                                error(103);
                        }
                } else {
-                       /* left operand of "->" must be pointer to ... */
                        if (tflag && tn->tn_type->t_tspec == PTR) {
                                /* left operand of '->' must be pointer ... */
                                warning(104, type_name(tn->tn_type));
@@ -886,7 +885,7 @@
                 */
                if (hflag &&
                    (ln->tn_op != CON || ln->tn_val->v_quad < 0)) {
-                       /* semantics of '%s' change in ANSI C; ... */
+                       /* semantics of '%s' change in ANSI C; use ... */
                        warning(118, mp->m_name);
                }
        } else if (!tflag && !sflag && !is_uinteger(olt) && !is_uinteger(ort) &&
@@ -2953,7 +2952,7 @@
                error(110);
                break;
        case VOID:
-               /* cannot do pointer arithmetic on operand of ... */
+               /* cannot do pointer arithmetic on operand of unknown size */
                gnuism(136);
                break;
        case STRUCT:
@@ -2979,7 +2978,7 @@
        }
 
        if (elem == 0 && elsz != 0) {
-               /* cannot do pointer arithmetic on operand of ... */
+               /* cannot do pointer arithmetic on operand of unknown size */
                error(136);
        }
 
@@ -3493,7 +3492,7 @@
        } else if (nt == PTR && ot == PTR) {
                if (!tp->t_subt->t_const && tn->tn_type->t_subt->t_const) {
                        if (hflag)
-                               /* cast discards 'const' from ... */
+                               /* cast discards 'const' from pointer tar... */
                                warning(275);
                }
        } else {



Home | Main Index | Thread Index | Old Index