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: reduce indentation in check_intege...
details: https://anonhg.NetBSD.org/src/rev/b638c152c06a
branches: trunk
changeset: 365231:b638c152c06a
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Apr 15 16:38:30 2022 +0000
description:
lint: reduce indentation in check_integer_conversion
No functional change.
diffstat:
usr.bin/xlint/lint1/tree.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diffs (49 lines):
diff -r 41db176e2cbc -r b638c152c06a usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Fri Apr 15 16:30:09 2022 +0000
+++ b/usr.bin/xlint/lint1/tree.c Fri Apr 15 16:38:30 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.424 2022/04/09 23:41:22 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.425 2022/04/15 16:38:30 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.424 2022/04/09 23:41:22 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.425 2022/04/15 16:38:30 rillig Exp $");
#endif
#include <float.h>
@@ -2226,20 +2226,18 @@
}
}
- if (portable_size_in_bits(nt) < portable_size_in_bits(ot) &&
+ if (aflag > 0 &&
+ portable_size_in_bits(nt) < portable_size_in_bits(ot) &&
(ot == LONG || ot == ULONG || ot == QUAD || ot == UQUAD ||
aflag > 1)) {
- /* conversion from '%s' may lose accuracy */
- if (aflag > 0) {
- if (op == FARG) {
- /* conversion from '%s' to '%s' may ... */
- warning(298,
- type_name(tn->tn_type), type_name(tp), arg);
- } else {
- /* conversion from '%s' to '%s' may ... */
- warning(132,
- type_name(tn->tn_type), type_name(tp));
- }
+ if (op == FARG) {
+ /* conversion from '%s' to '%s' may lose ... */
+ warning(298,
+ type_name(tn->tn_type), type_name(tp), arg);
+ } else {
+ /* conversion from '%s' to '%s' may lose accuracy */
+ warning(132,
+ type_name(tn->tn_type), type_name(tp));
}
}
}
Home |
Main Index |
Thread Index |
Old Index