Module Name:    src
Committed By:   rillig
Date:           Sun Dec 10 14:59:48 UTC 2023

Modified Files:
        src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c
        src/usr.bin/xlint/lint1: decl.c init.c
        src/usr.bin/xlint/xlint: xlint.c

Log Message:
lint: clean up comments

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.383 -r1.384 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.252 -r1.253 src/usr.bin/xlint/lint1/init.c
cvs rdiff -u -r1.120 -r1.121 src/usr.bin/xlint/xlint/xlint.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/d_c99_bool_strict.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.44 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.45
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.44	Wed Aug  2 18:51:25 2023
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c	Sun Dec 10 14:59:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: d_c99_bool_strict.c,v 1.44 2023/08/02 18:51:25 rillig Exp $	*/
+/*	$NetBSD: d_c99_bool_strict.c,v 1.45 2023/12/10 14:59:47 rillig Exp $	*/
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -160,7 +160,7 @@ enum strict_bool_constant_expressions {
 	/*
 	 * Without strict bool mode, these two variants of an expression can
 	 * occur when a preprocessor macro is either defined to 1 or left
-	 * empty (since C99), as in lint1/ops.def.
+	 * empty (since C99).
 	 *
 	 * In strict bool mode, the resulting expression can be compared
 	 * against 0 to achieve the same effect (so +0 != 0 or 1 + 0 != 0).

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.383 src/usr.bin/xlint/lint1/decl.c:1.384
--- src/usr.bin/xlint/lint1/decl.c:1.383	Sun Dec  3 18:17:41 2023
+++ src/usr.bin/xlint/lint1/decl.c	Sun Dec 10 14:59:47 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.383 2023/12/03 18:17:41 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.384 2023/12/10 14:59:47 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.383 2023/12/03 18:17:41 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.384 2023/12/10 14:59:47 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -97,11 +97,8 @@ initdecl(void)
 }
 
 /*
- * Returns a shared type structure for arithmetic types and void.
- *
- * It's important to duplicate this structure using block_dup_type or
- * expr_dup_type if it is to be modified (adding qualifiers or anything
- * else).
+ * Returns a shared type structure for arithmetic types and void.  The returned
+ * type must not be modified; use block_dup_type or expr_dup_type if necessary.
  */
 type_t *
 gettyp(tspec_t t)
@@ -296,7 +293,6 @@ typedef_error(type_t *td, tspec_t t)
 	return td;
 
 invalid:
-	/* Anything else is not accepted. */
 	dcs->d_invalid_type_combination = true;
 	return td;
 }

Index: src/usr.bin/xlint/lint1/init.c
diff -u src/usr.bin/xlint/lint1/init.c:1.252 src/usr.bin/xlint/lint1/init.c:1.253
--- src/usr.bin/xlint/lint1/init.c:1.252	Sun Dec  3 13:12:40 2023
+++ src/usr.bin/xlint/lint1/init.c	Sun Dec 10 14:59:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: init.c,v 1.252 2023/12/03 13:12:40 rillig Exp $	*/
+/*	$NetBSD: init.c,v 1.253 2023/12/10 14:59:47 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: init.c,v 1.252 2023/12/03 13:12:40 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.253 2023/12/10 14:59:47 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -100,7 +100,7 @@ typedef struct designator {
 
 /*
  * The path from the "current object" of a brace level to the sub-object that
- * is initialized by an expression.  Examples for designations are '.member'
+ * is initialized by an expression.  Examples of designations are '.member'
  * or '.member[123].member.member[1][1]'.
  *
  * C99 6.7.8p6, 6.7.8p7
@@ -115,7 +115,7 @@ typedef struct designation {
  * Everything that happens between a '{' and the corresponding '}', as part
  * of an initialization.
  *
- * Each brace level has a "current object".   For the outermost brace level,
+ * Each brace level has a "current object".  For the outermost brace level,
  * it is the same as the object to be initialized.  Each nested '{' begins a
  * nested brace level, for the sub-object pointed to by the designator of the
  * outer brace level.

Index: src/usr.bin/xlint/xlint/xlint.c
diff -u src/usr.bin/xlint/xlint/xlint.c:1.120 src/usr.bin/xlint/xlint/xlint.c:1.121
--- src/usr.bin/xlint/xlint/xlint.c:1.120	Sun Dec  3 18:17:41 2023
+++ src/usr.bin/xlint/xlint/xlint.c	Sun Dec 10 14:59:47 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: xlint.c,v 1.120 2023/12/03 18:17:41 rillig Exp $ */
+/* $NetBSD: xlint.c,v 1.121 2023/12/10 14:59:47 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: xlint.c,v 1.120 2023/12/03 18:17:41 rillig Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.121 2023/12/10 14:59:47 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -376,7 +376,7 @@ run_cpp(const char *name)
 	list_add(&args, name);
 	list_add_ref(&args, NULL);
 
-	/* we reuse the same tmp file for cpp output, so rewind and truncate */
+	/* Rewind after a possible previous run of cpp and lint1. */
 	if (lseek(cpp.outfd, 0, SEEK_SET) != 0) {
 		warn("lseek");
 		terminate(-1);

Reply via email to