Print this page
new smatch


  61         if (tmp)
  62                 expr = tmp;
  63         expr = strip_expr(expr);
  64 
  65         if (get_param_num(expr) < 0)
  66                 return;
  67 
  68         if (param_was_set(expr))
  69                 return;
  70 
  71         sm = get_sm_state_expr(my_id, expr);
  72         if (sm && slist_has_state(sm->possible, &ignore))
  73                 return;
  74         set_state_expr(my_id, expr, &derefed);
  75 }
  76 
  77 static void match_dereference(struct expression *expr)
  78 {
  79         if (expr->type != EXPR_PREOP)
  80                 return;
  81         if (getting_address())
  82                 return;
  83         check_deref(expr->unop);
  84 }
  85 
  86 static void set_param_dereferenced(struct expression *call, struct expression *arg, char *key, char *unused)
  87 {
  88         /* XXX FIXME: param_implies has more information now */
  89         if (strcmp(key, "$") != 0)
  90                 return;
  91         check_deref(arg);
  92 }
  93 
  94 static void process_states(void)
  95 {
  96         struct sm_state *tmp;
  97         int arg;
  98         const char *name;
  99 
 100         FOR_EACH_MY_SM(my_id, __get_cur_stree(), tmp) {
 101                 if (tmp->state != &derefed)
 102                         continue;




  61         if (tmp)
  62                 expr = tmp;
  63         expr = strip_expr(expr);
  64 
  65         if (get_param_num(expr) < 0)
  66                 return;
  67 
  68         if (param_was_set(expr))
  69                 return;
  70 
  71         sm = get_sm_state_expr(my_id, expr);
  72         if (sm && slist_has_state(sm->possible, &ignore))
  73                 return;
  74         set_state_expr(my_id, expr, &derefed);
  75 }
  76 
  77 static void match_dereference(struct expression *expr)
  78 {
  79         if (expr->type != EXPR_PREOP)
  80                 return;


  81         check_deref(expr->unop);
  82 }
  83 
  84 static void set_param_dereferenced(struct expression *call, struct expression *arg, char *key, char *unused)
  85 {
  86         /* XXX FIXME: param_implies has more information now */
  87         if (strcmp(key, "$") != 0)
  88                 return;
  89         check_deref(arg);
  90 }
  91 
  92 static void process_states(void)
  93 {
  94         struct sm_state *tmp;
  95         int arg;
  96         const char *name;
  97 
  98         FOR_EACH_MY_SM(my_id, __get_cur_stree(), tmp) {
  99                 if (tmp->state != &derefed)
 100                         continue;