Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/xlint lint: keep output from cpp if cpp fails
details: https://anonhg.NetBSD.org/src/rev/556b51d3d6ad
branches: trunk
changeset: 373136:556b51d3d6ad
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Jan 20 23:06:26 2023 +0000
description:
lint: keep output from cpp if cpp fails
Previously, lint only kept the cpp output if lint1 failed. Due to
subtle differences in the preprocessing, there can be cases where the
preprocessor already fails, for example when it takes a different
'#ifdef' branch and therefore tries to include nonexistent files. In
such a case, preserving the output of the preprocessor is helpful to
compare it with the regular output of cpp, so keep it.
diffstat:
usr.bin/xlint/xlint/xlint.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r eedf31bf6f37 -r 556b51d3d6ad usr.bin/xlint/xlint/xlint.c
--- a/usr.bin/xlint/xlint/xlint.c Fri Jan 20 22:08:48 2023 +0000
+++ b/usr.bin/xlint/xlint/xlint.c Fri Jan 20 23:06:26 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xlint.c,v 1.104 2023/01/15 23:32:10 rillig Exp $ */
+/* $NetBSD: xlint.c,v 1.105 2023/01/20 23:06:26 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: xlint.c,v 1.104 2023/01/15 23:32:10 rillig Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.105 2023/01/20 23:06:26 rillig Exp $");
#endif
#include <sys/param.h>
@@ -246,7 +246,7 @@
if (lint2.outlib != NULL)
(void)remove(lint2.outlib);
- if (currfn != NULL)
+ if (currfn != NULL && currfn != cpp.outfile)
(void)remove(currfn);
if (signo != 0)
Home |
Main Index |
Thread Index |
Old Index