summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/usr.bin/xlint/lint1/check-expect.lua4
-rw-r--r--usr.bin/xlint/lint1/debug.c6
-rw-r--r--usr.bin/xlint/lint1/tree.c8
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/usr.bin/xlint/lint1/check-expect.lua b/tests/usr.bin/xlint/lint1/check-expect.lua
index 06d1df6b042..8e507203b86 100644
--- a/tests/usr.bin/xlint/lint1/check-expect.lua
+++ b/tests/usr.bin/xlint/lint1/check-expect.lua
@@ -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
diff --git a/usr.bin/xlint/lint1/debug.c b/usr.bin/xlint/lint1/debug.c
index 1a8c2a62975..0d2d623f7d6 100644
--- a/usr.bin/xlint/lint1/debug.c
+++ b/usr.bin/xlint/lint1/debug.c
@@ -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;
diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c
index cd3dbef3c39..e5f2ff55dd7 100644
--- a/usr.bin/xlint/lint1/tree.c
+++ b/usr.bin/xlint/lint1/tree.c
@@ -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, const tnode_t *rn)
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)