Module Name:    src
Committed By:   rillig
Date:           Sun Jan 17 16:25:30 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: decl.c lint1.h tree.c

Log Message:
lint: extend a few message comments


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.57 -r1.58 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.176 -r1.177 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/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.126 src/usr.bin/xlint/lint1/decl.c:1.127
--- src/usr.bin/xlint/lint1/decl.c:1.126	Sun Jan 17 15:24:03 2021
+++ src/usr.bin/xlint/lint1/decl.c	Sun Jan 17 16:25:30 2021
@@ -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 @@ tdeferr(type_t *td, tspec_t t)
 	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 @@ deftyp(void)
 		}
 	} 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;
 		}

Index: src/usr.bin/xlint/lint1/lint1.h
diff -u src/usr.bin/xlint/lint1/lint1.h:1.57 src/usr.bin/xlint/lint1/lint1.h:1.58
--- src/usr.bin/xlint/lint1/lint1.h:1.57	Sat Jan 16 16:53:23 2021
+++ src/usr.bin/xlint/lint1/lint1.h	Sun Jan 17 16:25:30 2021
@@ -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 @@ struct type {
 	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) */

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.176 src/usr.bin/xlint/lint1/tree.c:1.177
--- src/usr.bin/xlint/lint1/tree.c:1.176	Sun Jan 17 16:19:54 2021
+++ src/usr.bin/xlint/lint1/tree.c	Sun Jan 17 16:25:30 2021
@@ -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 @@ struct_or_union_member(tnode_t *tn, op_t
 				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 @@ typeok_shr(const mod_t *mp,
 		 */
 		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 @@ plength(type_t *tp)
 		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 @@ plength(type_t *tp)
 	}
 
 	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 @@ cast(tnode_t *tn, type_t *tp)
 	} 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 {

Reply via email to