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: remove dead code from check_bad_en...
details: https://anonhg.NetBSD.org/src/rev/c903c40cdcac
branches: trunk
changeset: 1022971:c903c40cdcac
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Aug 16 18:51:03 2021 +0000
description:
lint: remove dead code from check_bad_enum_operation
There is a single caller of that function, and it checks the exact same
condition beforehand.
diffstat:
usr.bin/xlint/lint1/tree.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diffs (38 lines):
diff -r 0d45d84dcb4b -r c903c40cdcac usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Mon Aug 16 18:43:06 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c Mon Aug 16 18:51:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.336 2021/08/15 14:26:39 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.337 2021/08/16 18:51:03 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.336 2021/08/15 14:26:39 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.337 2021/08/16 18:51:03 rillig Exp $");
#endif
#include <float.h>
@@ -1587,11 +1587,6 @@
if (!eflag)
return;
- if (!(ln->tn_type->t_is_enum ||
- (modtab[op].m_binary && rn->tn_type->t_is_enum))) {
- return;
- }
-
/*
* Enum as offset to a pointer is an exception (otherwise enums
* could not be used as array indices).
@@ -1604,7 +1599,6 @@
/* dubious operation on enum, op %s */
warning(241, op_name(op));
-
}
/*
Home |
Main Index |
Thread Index |
Old Index