Module Name: src
Committed By: rillig
Date: Tue Jan 23 20:03:42 UTC 2024
Modified Files:
src/usr.bin/xlint/lint1: decl.c tree.c
Log Message:
lint: unconst parameters
These were leftovers from earlier refactorings and are no longer needed.
No binary change.
To generate a diff of this commit:
cvs rdiff -u -r1.389 -r1.390 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.597 -r1.598 src/usr.bin/xlint/lint1/tree.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.389 src/usr.bin/xlint/lint1/decl.c:1.390
--- src/usr.bin/xlint/lint1/decl.c:1.389 Tue Jan 23 19:44:28 2024
+++ src/usr.bin/xlint/lint1/decl.c Tue Jan 23 20:03:42 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.389 2024/01/23 19:44:28 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.390 2024/01/23 20:03:42 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.389 2024/01/23 19:44:28 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.390 2024/01/23 20:03:42 rillig Exp $");
#endif
#include <sys/param.h>
@@ -932,7 +932,7 @@ check_type(sym_t *sym)
* implementation-defined type".
*/
static void
-check_bit_field_type(sym_t *dsym, type_t **const inout_tp, tspec_t *inout_t)
+check_bit_field_type(sym_t *dsym, type_t **inout_tp, tspec_t *inout_t)
{
type_t *tp = *inout_tp;
tspec_t t = *inout_t;
@@ -976,7 +976,7 @@ check_bit_field_type(sym_t *dsym, type_t
}
static void
-check_bit_field(sym_t *dsym, tspec_t *inout_t, type_t **const inout_tp)
+check_bit_field(sym_t *dsym, tspec_t *inout_t, type_t **inout_tp)
{
check_bit_field_type(dsym, inout_tp, inout_t);
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.597 src/usr.bin/xlint/lint1/tree.c:1.598
--- src/usr.bin/xlint/lint1/tree.c:1.597 Tue Jan 23 19:44:28 2024
+++ src/usr.bin/xlint/lint1/tree.c Tue Jan 23 20:03:42 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.597 2024/01/23 19:44:28 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.598 2024/01/23 20:03:42 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.597 2024/01/23 19:44:28 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.598 2024/01/23 20:03:42 rillig Exp $");
#endif
#include <float.h>
@@ -2670,11 +2670,11 @@ check_unconst_function(const type_t *lst
static bool
check_assign_void_pointer_compat(op_t op, int arg,
- const type_t *const ltp, tspec_t const lt,
- const type_t *const lstp, tspec_t const lst,
- const tnode_t *const rn,
- const type_t *const rtp, tspec_t const rt,
- const type_t *const rstp, tspec_t const rst)
+ const type_t *ltp, tspec_t lt,
+ const type_t *lstp, tspec_t lst,
+ const tnode_t *rn,
+ const type_t *rtp, tspec_t rt,
+ const type_t *rstp, tspec_t rst)
{
if (!(lt == PTR && rt == PTR && (lst == VOID || rst == VOID ||
types_compatible(lstp, rstp,
@@ -2713,8 +2713,8 @@ check_assign_void_pointer_compat(op_t op
static bool
check_assign_pointer_integer(op_t op, int arg,
- const type_t *const ltp, tspec_t const lt,
- const type_t *const rtp, tspec_t const rt)
+ const type_t *ltp, tspec_t lt,
+ const type_t *rtp, tspec_t rt)
{
if (!((lt == PTR && is_integer(rt)) || (is_integer(lt) && rt == PTR)))