Print this page
new smatch

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/smatch_integer_overflow.c
          +++ new/usr/src/tools/smatch/src/smatch_integer_overflow.c
↓ open down ↓ 176 lines elided ↑ open up ↑
 177  177                  return 1;
 178  178          return 0;
 179  179  }
 180  180  
 181  181  int can_integer_overflow_expr(struct expression *expr)
 182  182  {
 183  183          struct symbol *type;
 184  184          struct smatch_state *state;
 185  185          char *name;
 186  186          struct symbol *sym;
 187      -        int ret;
      187 +        int ret = 1;
 188  188  
 189  189          type = get_type(expr);
 190  190          if (!type)
 191  191                  return 0;
 192  192  
 193  193          if (!can_integer_overflow(type, expr))
 194  194                  return 0;
 195  195  
 196  196          name = expr_to_known_chunk_sym(expr, &sym);
 197  197          if (!name || !sym)
↓ open down ↓ 95 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX