diff options
| author | rillig <rillig@NetBSD.org> | 2023-07-07 06:03:31 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2023-07-07 06:03:31 +0000 |
| commit | f260bdb92f361d3b4e3ab9d23e5f0eb4faafd698 (patch) | |
| tree | ab7115a0d2c19d8f3c540e8afc852a7403b759f7 /usr.bin/xlint/lint1/externs1.h | |
| parent | eed2e1f5f354b83b1e2723c0412ffdf22f00d4e8 (diff) | |
lint: only skip 'unused' warnings after errors, not other warnings
Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that. This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.
Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
Diffstat (limited to 'usr.bin/xlint/lint1/externs1.h')
| -rw-r--r-- | usr.bin/xlint/lint1/externs1.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/xlint/lint1/externs1.h b/usr.bin/xlint/lint1/externs1.h index 712b7a4dc32..66924a1395f 100644 --- a/usr.bin/xlint/lint1/externs1.h +++ b/usr.bin/xlint/lint1/externs1.h @@ -1,4 +1,4 @@ -/* $NetBSD: externs1.h,v 1.188 2023/07/02 23:40:23 rillig Exp $ */ +/* $NetBSD: externs1.h,v 1.189 2023/07/07 06:03:31 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -156,7 +156,8 @@ void debug_leave_func(const char *); /* * err.c */ -extern int nerr; +extern bool seen_error; +extern bool seen_warning; extern int sytxerr; extern bool any_query_enabled; |
