From 21d2d99bdc115e1a1944bc0dff9d487103f5799f Mon Sep 17 00:00:00 2001 From: bellard Date: Mon, 2 Jun 2003 20:32:30 +0000 Subject: [PATCH] suppressed warning for const function parameters --- tcc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcc.c b/tcc.c index 16920eb1..3da2068f 100644 --- a/tcc.c +++ b/tcc.c @@ -6581,7 +6581,9 @@ static void gfunc_param_typed(Sym *func, Sym *arg) } else if (arg == NULL) { error("too many arguments to function"); } else { - gen_assign_cast(&arg->type); + type = arg->type; + type.t &= ~VT_CONSTANT; /* need to do that to avoid false warning */ + gen_assign_cast(&type); } } -- 2.11.4.GIT