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: clean up should_warn_about_prototy...



details:   https://anonhg.NetBSD.org/src/rev/ba8c2b736293
branches:  trunk
changeset: 1023303:ba8c2b736293
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Sep 02 16:16:49 2021 +0000

description:
lint: clean up should_warn_about_prototype_conversion

diffstat:

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

diffs (42 lines):

diff -r db116f6e3ee7 -r ba8c2b736293 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Thu Sep 02 11:28:45 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Thu Sep 02 16:16:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.365 2021/09/01 06:48:24 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.366 2021/09/02 16:16:49 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.365 2021/09/01 06:48:24 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.366 2021/09/02 16:16:49 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -1986,11 +1986,8 @@
  * types, print no warning.
  */
 static bool
-should_warn_about_prototype_conversion(
-    int arg,
-    const type_t *tp, tspec_t nt,
-    const tnode_t *tn, tspec_t ot,
-    const tnode_t *ptn)
+should_warn_about_prototype_conversion(tspec_t nt,
+                                      tspec_t ot, const tnode_t *ptn)
 {
 
        if (is_floating(nt) != is_floating(ot) ||
@@ -2050,8 +2047,7 @@
        if (nt == ot || (nt == ENUM && ot == INT))
                return;
 
-       if (should_warn_about_prototype_conversion(
-           arg, tp, nt, tn, ot, ptn)) {
+       if (should_warn_about_prototype_conversion(nt, ot, ptn)) {
                /* argument #%d is converted from '%s' to '%s' ... */
                warning(259, arg, type_name(tn->tn_type), type_name(tp));
        }



Home | Main Index | Thread Index | Old Index