diff options
| -rw-r--r-- | usr.bin/xlint/lint1/lex.c | 6 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/lint1.h | 4 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/tree.c | 10 |
3 files changed, 9 insertions, 11 deletions
diff --git a/usr.bin/xlint/lint1/lex.c b/usr.bin/xlint/lint1/lex.c index a60cc5666d1..53f1735ea3c 100644 --- a/usr.bin/xlint/lint1/lex.c +++ b/usr.bin/xlint/lint1/lex.c @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.167 2023/07/03 07:03:19 rillig Exp $ */ +/* $NetBSD: lex.c,v 1.168 2023/07/03 07:19:57 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) -__RCSID("$NetBSD: lex.c,v 1.167 2023/07/03 07:03:19 rillig Exp $"); +__RCSID("$NetBSD: lex.c,v 1.168 2023/07/03 07:19:57 rillig Exp $"); #endif #include <ctype.h> @@ -1117,7 +1117,7 @@ lex_comment(void) } } arg[l] = '\0'; - a = l != 0 ? (int)atoi(arg) : -1; + a = l != 0 ? atoi(arg) : -1; /* skip whitespace after the argument */ while (isspace(c)) diff --git a/usr.bin/xlint/lint1/lint1.h b/usr.bin/xlint/lint1/lint1.h index 7787e0af8c5..6ef6eb8274a 100644 --- a/usr.bin/xlint/lint1/lint1.h +++ b/usr.bin/xlint/lint1/lint1.h @@ -1,4 +1,4 @@ -/* $NetBSD: lint1.h,v 1.180 2023/07/03 07:03:19 rillig Exp $ */ +/* $NetBSD: lint1.h,v 1.181 2023/07/03 07:19:57 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -574,7 +574,7 @@ bit(unsigned i) static inline bool msb(int64_t si, tspec_t t) { - return (si & bit((unsigned int)size_in_bits(t) - 1)) != 0; + return (si & bit(size_in_bits(t) - 1)) != 0; } static inline uint64_t diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c index d29021f2d6c..17c69fbfe35 100644 --- a/usr.bin/xlint/lint1/tree.c +++ b/usr.bin/xlint/lint1/tree.c @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.545 2023/07/03 07:03:19 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.546 2023/07/03 07:19:57 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) -__RCSID("$NetBSD: tree.c,v 1.545 2023/07/03 07:03:19 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.546 2023/07/03 07:19:57 rillig Exp $"); #endif #include <float.h> @@ -2332,12 +2332,10 @@ typeok_shift(const type_t *ltp, tspec_t lt, const tnode_t *rn, tspec_t rt) if (!is_uinteger(rt) && rn->tn_val.u.integer < 0) { /* negative shift */ warning(121); - } else if ((uint64_t)rn->tn_val.u.integer == - (uint64_t)size_in_bits(lt)) { + } else if ((uint64_t)rn->tn_val.u.integer == size_in_bits(lt)) { /* shift amount %u equals bit-size of '%s' */ warning(267, (unsigned)rn->tn_val.u.integer, type_name(ltp)); - } else if ((uint64_t)rn->tn_val.u.integer - > (uint64_t)size_in_bits(lt)) { + } else if ((uint64_t)rn->tn_val.u.integer > size_in_bits(lt)) { /* shift amount %llu is greater than bit-size %llu of '%s' */ warning(122, (unsigned long long)rn->tn_val.u.integer, (unsigned long long)size_in_bits(lt), |
