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 redundant type casts from c...



details:   https://anonhg.NetBSD.org/src/rev/f0749f0c4a5a
branches:  trunk
changeset: 985485:f0749f0c4a5a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 28 12:29:40 2021 +0000

description:
lint: remove redundant type casts from convert_constant_floating

Since tree.c 1.70 from 2012-03-27, lint has been using properly typed
constants for the min and max values, independent from the host
platform.

No functional change.

diffstat:

 usr.bin/xlint/lint1/tree.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r ef165e559524 -r f0749f0c4a5a usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Sat Aug 28 12:21:53 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Sat Aug 28 12:29:40 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.353 2021/08/28 12:21:53 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.354 2021/08/28 12:29:40 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.353 2021/08/28 12:21:53 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.354 2021/08/28 12:29:40 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -2215,15 +2215,15 @@
        case INT:
                max = TARG_INT_MAX;     min = TARG_INT_MIN;     break;
        case UINT:
-               max = (unsigned int)TARG_UINT_MAX; min = 0;     break;
+               max = TARG_UINT_MAX;    min = 0;                break;
        case LONG:
                max = TARG_LONG_MAX;    min = TARG_LONG_MIN;    break;
        case ULONG:
-               max = (unsigned long)TARG_ULONG_MAX; min = 0;   break;
+               max = TARG_ULONG_MAX;   min = 0;                break;
        case QUAD:
                max = QUAD_MAX;         min = QUAD_MIN;         break;
        case UQUAD:
-               max = (uint64_t)UQUAD_MAX; min = 0;             break;
+               max = UQUAD_MAX;        min = 0;                break;
        case FLOAT:
        case FCOMPLEX:
                max = FLT_MAX;          min = -FLT_MAX;         break;



Home | Main Index | Thread Index | Old Index