Module Name: src
Committed By: rillig
Date: Thu Feb 27 06:48:29 UTC 2025
Modified Files:
src/tests/usr.bin/xlint/lint1: accept.sh check-expect.lua init_c99.c
msg_196.c
src/usr.bin/xlint/lint1: decl.c lex.c
src/usr.bin/xlint/lint2: chk.c lint2.h
Log Message:
lint: normalize whitespace
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/xlint/lint1/accept.sh
cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/check-expect.lua
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/init_c99.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_196.c
cvs rdiff -u -r1.412 -r1.413 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.232 -r1.233 src/usr.bin/xlint/lint1/lex.c
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/xlint/lint2/chk.c
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/xlint/lint2/lint2.h
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/accept.sh
diff -u src/tests/usr.bin/xlint/lint1/accept.sh:1.17 src/tests/usr.bin/xlint/lint1/accept.sh:1.18
--- src/tests/usr.bin/xlint/lint1/accept.sh:1.17 Fri Jan 3 03:14:47 2025
+++ src/tests/usr.bin/xlint/lint1/accept.sh Thu Feb 27 06:48:29 2025
@@ -1,5 +1,5 @@
#! /bin/sh
-# $NetBSD: accept.sh,v 1.17 2025/01/03 03:14:47 rillig Exp $
+# $NetBSD: accept.sh,v 1.18 2025/02/27 06:48:29 rillig Exp $
#
# Copyright (c) 2021 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -86,7 +86,7 @@ for pattern in "$@"; do
continue
fi
- if [ -f "$exp_file" ] && cmp -s "$exp_tmp_file" "$exp_file"; then
+ if [ -f "$exp_file" ] && cmp -s "$exp_tmp_file" "$exp_file"; then
rm "$exp_tmp_file"
else
mv "$exp_tmp_file" "$exp_file"
Index: src/tests/usr.bin/xlint/lint1/check-expect.lua
diff -u src/tests/usr.bin/xlint/lint1/check-expect.lua:1.13 src/tests/usr.bin/xlint/lint1/check-expect.lua:1.14
--- src/tests/usr.bin/xlint/lint1/check-expect.lua:1.13 Fri Jan 3 02:14:52 2025
+++ src/tests/usr.bin/xlint/lint1/check-expect.lua Thu Feb 27 06:48:29 2025
@@ -1,5 +1,5 @@
-#! /usr/bin/lua
--- $NetBSD: check-expect.lua,v 1.13 2025/01/03 02:14:52 rillig Exp $
+#! /usr/bin/lua
+-- $NetBSD: check-expect.lua,v 1.14 2025/02/27 06:48:29 rillig Exp $
--[[
Index: src/tests/usr.bin/xlint/lint1/init_c99.c
diff -u src/tests/usr.bin/xlint/lint1/init_c99.c:1.3 src/tests/usr.bin/xlint/lint1/init_c99.c:1.4
--- src/tests/usr.bin/xlint/lint1/init_c99.c:1.3 Thu Feb 20 20:59:34 2025
+++ src/tests/usr.bin/xlint/lint1/init_c99.c Thu Feb 27 06:48:29 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: init_c99.c,v 1.3 2025/02/20 20:59:34 rillig Exp $ */
+/* $NetBSD: init_c99.c,v 1.4 2025/02/27 06:48:29 rillig Exp $ */
# 3 "init_c99.c"
// Tests for initialization in C99 or later, mainly for designators.
@@ -570,17 +570,17 @@ struct {
char *s;
} struct_array[] = {
{
- .i = 2,
+ .i = 2,
},
{
- .s = "foo"
+ .s = "foo"
},
{
- .i = 1,
+ .i = 1,
.s = "bar"
},
{
- .s = "foo",
+ .s = "foo",
.i = -1
},
};
Index: src/tests/usr.bin/xlint/lint1/msg_196.c
diff -u src/tests/usr.bin/xlint/lint1/msg_196.c:1.5 src/tests/usr.bin/xlint/lint1/msg_196.c:1.6
--- src/tests/usr.bin/xlint/lint1/msg_196.c:1.5 Thu Feb 27 06:23:07 2025
+++ src/tests/usr.bin/xlint/lint1/msg_196.c Thu Feb 27 06:48:29 2025
@@ -1,11 +1,11 @@
-/* $NetBSD: msg_196.c,v 1.5 2025/02/27 06:23:07 rillig Exp $ */
+/* $NetBSD: msg_196.c,v 1.6 2025/02/27 06:48:29 rillig Exp $ */
# 3 "msg_196.c"
// Test for message: case label is converted from '%s' to '%s' [196]
/* lint1-extra-flags: -X 351 */
-// C23 6.8.5.3p5 says: [...] The constant expression in each case label is
+// C23 6.8.5.3p5 says: [...] The constant expression in each case label is
// converted to the promoted type of the controlling expression. [...]
void
Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.412 src/usr.bin/xlint/lint1/decl.c:1.413
--- src/usr.bin/xlint/lint1/decl.c:1.412 Fri Jan 3 03:14:47 2025
+++ src/usr.bin/xlint/lint1/decl.c Thu Feb 27 06:48:28 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.412 2025/01/03 03:14:47 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.413 2025/02/27 06:48:28 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.412 2025/01/03 03:14:47 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.413 2025/02/27 06:48:28 rillig Exp $");
#endif
#include <sys/param.h>
@@ -2297,8 +2297,8 @@ types_compatible(const type_t *tp1, cons
* second compatible type.
*
* Following lines are legal:
- * "typedef a[]; a b; a b[10]; a c; a c[20];"
- * "typedef ft(); ft f; f(int); ft g; g(long);"
+ * "typedef a[]; a b; a b[10]; a c; a c[20];"
+ * "typedef ft(); ft f; f(int); ft g; g(long);"
* This means that, if a type is completed, the type structure must be
* duplicated.
*/
Index: src/usr.bin/xlint/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.232 src/usr.bin/xlint/lint1/lex.c:1.233
--- src/usr.bin/xlint/lint1/lex.c:1.232 Sun Dec 8 17:12:01 2024
+++ src/usr.bin/xlint/lint1/lex.c Thu Feb 27 06:48:28 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.232 2024/12/08 17:12:01 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.233 2025/02/27 06:48:28 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: lex.c,v 1.232 2024/12/08 17:12:01 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.233 2025/02/27 06:48:28 rillig Exp $");
#endif
#include <ctype.h>
@@ -1064,7 +1064,7 @@ set_csrc_pos(void)
outsrc(transform_filename(curr_pos.p_file, strlen(curr_pos.p_file)));
}
-/* # lineno ["filename" [GCC-flag...]] */
+/* # lineno ["filename" [GCC-flag...]] */
static void
set_location(const char *p)
{
Index: src/usr.bin/xlint/lint2/chk.c
diff -u src/usr.bin/xlint/lint2/chk.c:1.68 src/usr.bin/xlint/lint2/chk.c:1.69
--- src/usr.bin/xlint/lint2/chk.c:1.68 Sat Nov 30 18:17:11 2024
+++ src/usr.bin/xlint/lint2/chk.c Thu Feb 27 06:48:29 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: chk.c,v 1.68 2024/11/30 18:17:11 rillig Exp $ */
+/* $NetBSD: chk.c,v 1.69 2025/02/27 06:48:29 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: chk.c,v 1.68 2024/11/30 18:17:11 rillig Exp $");
+__RCSID("$NetBSD: chk.c,v 1.69 2025/02/27 06:48:29 rillig Exp $");
#endif
#include <ctype.h>
@@ -433,16 +433,15 @@ chkfaui(const hte_t *hte, sym_t *def, sy
/*
* Check a single argument in a function call.
*
- * hte a pointer to the hash table entry of the function
- * n the number of the argument (1..)
- * def the function definition or NULL
- * decl prototype declaration, old-style declaration or NULL
- * pos1p position of definition, declaration of first call
- * call1 first call, if both def and decl are old-style def/decl
- * call checked call
- * arg1 currently checked argument of def/decl/call1
- * arg2 currently checked argument of call
- *
+ * hte a pointer to the hash table entry of the function
+ * n the number of the argument (1..)
+ * def the function definition or NULL
+ * decl prototype declaration, old-style declaration or NULL
+ * pos1p position of definition, declaration of first call
+ * call1 first call, if both def and decl are old-style def/decl
+ * call checked call
+ * arg1 currently checked argument of def/decl/call1
+ * arg2 currently checked argument of call
*/
static void
chkau(const hte_t *hte, int n, sym_t *def, sym_t *decl, pos_t *pos1p,
@@ -480,9 +479,9 @@ chkau(const hte_t *hte, int n, sym_t *de
* argument does not match exactly the expected type. The result are
* lots of warnings which are really not necessary.
* We print a warning only if
- * (0) at least one type is not an integer type and types differ
- * (1) hflag is set and types differ
- * (2) types differ, except in signedness
+ * (0) at least one type is not an integer type and types differ
+ * (1) hflag is set and types differ
+ * (2) types differ, except in signedness
*
* If the argument is an integer constant whose msb is not set,
* signedness is ignored (e.g. 0 matches both signed and unsigned int).
Index: src/usr.bin/xlint/lint2/lint2.h
diff -u src/usr.bin/xlint/lint2/lint2.h:1.27 src/usr.bin/xlint/lint2/lint2.h:1.28
--- src/usr.bin/xlint/lint2/lint2.h:1.27 Sun Dec 3 18:17:41 2023
+++ src/usr.bin/xlint/lint2/lint2.h Thu Feb 27 06:48:29 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: lint2.h,v 1.27 2023/12/03 18:17:41 rillig Exp $ */
+/* $NetBSD: lint2.h,v 1.28 2025/02/27 06:48:29 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -178,7 +178,7 @@ typedef struct hte {
usym_t *h_usyms; /* usage info */
usym_t **h_lusym; /* points to u_next of last usage info */
struct hte *h_link; /* next hte with same hash function */
- struct hte *h_hte; /* pointer to other htes (for renames) */
+ struct hte *h_hte; /* pointer to other htes (for renames) */
} hte_t;
#include "externs2.h"