From 8f6073d44655aaa96f0e2af8ddd7c9e9404c5b32 Mon Sep 17 00:00:00 2001 From: carl Date: Sat, 2 Mar 2019 01:41:01 +0800 Subject: [PATCH] + Better type checking in function tables. --- lang/pc/comp/chk_expr.c | 2 +- lang/pc/comp/chk_expr.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/pc/comp/chk_expr.c b/lang/pc/comp/chk_expr.c index 2d1f1246d..8a74b5271 100644 --- a/lang/pc/comp/chk_expr.c +++ b/lang/pc/comp/chk_expr.c @@ -1383,7 +1383,7 @@ int (*ExprChkTable[])(struct node*) = NodeCrash }; - int (*VarAccChkTable[])() = + int (*VarAccChkTable[])(struct node*) = { no_var_access, ChkLinkOrName, diff --git a/lang/pc/comp/chk_expr.h b/lang/pc/comp/chk_expr.h index 396ee8fb5..77f29997b 100644 --- a/lang/pc/comp/chk_expr.h +++ b/lang/pc/comp/chk_expr.h @@ -2,11 +2,11 @@ struct node; -extern int (*ExprChkTable[])(); /* table of expression checking +extern int (*ExprChkTable[])(struct node*); /* table of expression checking functions, indexed by node class */ -extern int (*VarAccChkTable[])(); /* table of variable-access checking +extern int (*VarAccChkTable[])(struct node*); /* table of variable-access checking functions, indexed by node class */ -- 2.34.1