Warn if SCHED/WARN/OMITFUNC functions take wrong number of args.

This commit is contained in:
Dianne Skoll
2024-08-28 15:02:22 -04:00
parent 80d58220fe
commit b7bd6faf07
3 changed files with 61 additions and 9 deletions
+4
View File
@@ -71,6 +71,10 @@ check_trigger_function(char const *fname, char const *type)
}
return;
}
if (f->nargs != 1) {
Wprint("%s function `%s' defined at %s:%d should take 1 argument but actually takes %d", type, fname, f->filename, f->lineno, f->nargs);
return;
}
if (ensure_expr_references_first_local_arg(f->node)) {
return;
}