Add a comment showing where the tests are supposed to go.
[smatch.git] / smatch.c
blob5a7e992d8a37513cbfe8000ecebc7558f205c2a0
1 /*
2 * sparse/smatch.c
4 * Copyright (C) 2006 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
8 */
10 #include <stdio.h>
11 #include "smatch.h"
13 typedef void (*reg_func) (int id);
14 void register_derefed_params(int id);
15 void register_null_deref(int id);
16 void register_smatch_extra(int id);
17 void register_smatch_ignore(int id);
18 void register_overflow(int id);
19 /* <- your test goes here */
20 /* void register_template(int id); */
22 const reg_func reg_funcs[] = {
23 &register_smatch_extra,
24 &register_smatch_ignore,
25 &register_null_deref,
26 &register_overflow,
27 /* <- your test goes here */
28 /* &register_template, */
29 NULL
32 int main(int argc, char **argv)
34 int i;
35 reg_func func;
37 /* The script IDs start at 1.
38 0 is used for internal stuff. */
39 for(i = 0; (func = reg_funcs[i]); i++){
40 func(i + 1);
43 if (argc >= 2 && !strcmp(argv[1], "--debug")) {
44 debug_states = 1;
45 argc--;
46 argv++;
49 smatch(argc, argv);
50 return 0;