Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: migrate the getopt check to warnin...
details: https://anonhg.NetBSD.org/src/rev/84a4a1e428fe
branches: trunk
changeset: 378600:84a4a1e428fe
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Apr 18 08:53:35 2021 +0000
description:
lint: migrate the getopt check to warning_at
diffstat:
usr.bin/xlint/lint1/ckgetopt.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r bf8bf741169b -r 84a4a1e428fe usr.bin/xlint/lint1/ckgetopt.c
--- a/usr.bin/xlint/lint1/ckgetopt.c Sun Apr 18 08:52:04 2021 +0000
+++ b/usr.bin/xlint/lint1/ckgetopt.c Sun Apr 18 08:53:35 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ckgetopt.c,v 1.7 2021/03/22 19:25:08 rillig Exp $ */
+/* $NetBSD: ckgetopt.c,v 1.8 2021/04/18 08:53:35 rillig Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: ckgetopt.c,v 1.7 2021/03/22 19:25:08 rillig Exp $");
+__RCSID("$NetBSD: ckgetopt.c,v 1.8 2021/04/18 08:53:35 rillig Exp $");
#endif
#include <stdbool.h>
@@ -134,11 +134,8 @@ check_unhandled_option(void)
if (*opt == ' ' || *opt == ':')
continue;
- pos_t prev_pos = curr_pos;
- curr_pos = ck.options_pos;
/* option '%c' should be handled in the switch */
- warning(338, *opt);
- curr_pos = prev_pos;
+ warning_at(338, ck.options_pos, *opt);
}
}
Home |
Main Index |
Thread Index |
Old Index