Module Name: src Committed By: rillig Date: Sat Jul 1 09:21:31 UTC 2023
Modified Files: src/tests/usr.bin/xlint/lint1: check-expect.lua src/usr.bin/xlint/lint1: debug.c tree.c Log Message: lint: clean up typos To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/check-expect.lua cvs rdiff -u -r1.40 -r1.41 src/usr.bin/xlint/lint1/debug.c cvs rdiff -u -r1.539 -r1.540 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/tests/usr.bin/xlint/lint1/check-expect.lua diff -u src/tests/usr.bin/xlint/lint1/check-expect.lua:1.3 src/tests/usr.bin/xlint/lint1/check-expect.lua:1.4 --- src/tests/usr.bin/xlint/lint1/check-expect.lua:1.3 Wed Jun 28 17:53:21 2023 +++ src/tests/usr.bin/xlint/lint1/check-expect.lua Sat Jul 1 09:21:31 2023 @@ -1,5 +1,5 @@ #! /usr/bin/lua --- $NetBSD: check-expect.lua,v 1.3 2023/06/28 17:53:21 rillig Exp $ +-- $NetBSD: check-expect.lua,v 1.4 2023/07/01 09:21:31 rillig Exp $ --[[ @@ -58,7 +58,7 @@ end -- }, -- { "file.c(18)", "file.c(23)" } local function load_c(fname) - local basename = fname:match("([^/]+)$") or fname + local basename = fname:match("([^/]+)$") local lines = load_lines(fname) if lines == nil then return nil, nil end Index: src/usr.bin/xlint/lint1/debug.c diff -u src/usr.bin/xlint/lint1/debug.c:1.40 src/usr.bin/xlint/lint1/debug.c:1.41 --- src/usr.bin/xlint/lint1/debug.c:1.40 Fri Jun 30 21:39:54 2023 +++ src/usr.bin/xlint/lint1/debug.c Sat Jul 1 09:21:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: debug.c,v 1.40 2023/06/30 21:39:54 rillig Exp $ */ +/* $NetBSD: debug.c,v 1.41 2023/07/01 09:21:31 rillig Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) -__RCSID("$NetBSD: debug.c,v 1.40 2023/06/30 21:39:54 rillig Exp $"); +__RCSID("$NetBSD: debug.c,v 1.41 2023/07/01 09:21:31 rillig Exp $"); #endif #include <stdlib.h> @@ -440,7 +440,7 @@ debug_dinfo(const decl_level *dl) arg != NULL; arg = arg->s_next) debug_sym(" arg(", arg, ")"); if (dl->d_func_def_pos.p_file != NULL) - debug_printf(" func_def_pos=%s:%dl:%dl", + debug_printf(" func_def_pos=%s:%d:%d", dl->d_func_def_pos.p_file, dl->d_func_def_pos.p_line, dl->d_func_def_pos.p_uniq); for (const sym_t *sym = dl->d_func_proto_syms; Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.539 src/usr.bin/xlint/lint1/tree.c:1.540 --- src/usr.bin/xlint/lint1/tree.c:1.539 Sat Jul 1 06:09:24 2023 +++ src/usr.bin/xlint/lint1/tree.c Sat Jul 1 09:21:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.539 2023/07/01 06:09:24 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.540 2023/07/01 09:21:31 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) -__RCSID("$NetBSD: tree.c,v 1.539 2023/07/01 06:09:24 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.540 2023/07/01 09:21:31 rillig Exp $"); #endif #include <float.h> @@ -1066,8 +1066,8 @@ check_enum_array_index(const tnode_t *ln return; const type_t *rtp = rn->tn_left->tn_type; - const struct sym *ec = rtp->t_enum->en_first_enumerator; - const struct sym *max_ec = ec; + const sym_t *ec = rtp->t_enum->en_first_enumerator; + const sym_t *max_ec = ec; lint_assert(ec != NULL); for (ec = ec->s_next; ec != NULL; ec = ec->s_next) if (ec->u.s_enum_constant > max_ec->u.s_enum_constant)