Print this page
new smatch

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/check_unwind.c
          +++ new/usr/src/tools/smatch/src/check_unwind.c
↓ open down ↓ 117 lines elided ↑ open up ↑
 118  118  }
 119  119  
 120  120  static int func_returns_int(void)
 121  121  {
 122  122          struct symbol *type;
 123  123  
 124  124          type = get_base_type(cur_func_sym);
 125  125          if (!type || type->type != SYM_FN)
 126  126                  return 0;
 127  127          type = get_base_type(type);
 128      -        if (type->ctype.base_type == &int_type) {
      128 +        if (type && type->ctype.base_type == &int_type) {
 129  129                  return 1;
 130  130          }
 131  131          return 0;
 132  132  }
 133  133  
 134  134  static void match_return(struct expression *ret_value)
 135  135  {
 136  136          struct stree *stree;
 137  137          struct sm_state *tmp;
 138  138          sval_t sval;
↓ open down ↓ 94 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX