Print this page
11972 resync smatch

*** 396,406 **** return 0; sym = get_base_type(sym); if (!sym || sym->type != SYM_FN) return 0; sym = get_base_type(sym); ! if (sym->type == SYM_PTR) return 1; return 0; } sval_t sval_type_max(struct symbol *base_type) --- 396,406 ---- return 0; sym = get_base_type(sym); if (!sym || sym->type != SYM_FN) return 0; sym = get_base_type(sym); ! if (sym && sym->type == SYM_PTR) return 1; return 0; } sval_t sval_type_max(struct symbol *base_type)
*** 494,517 **** free: free_string(name); return ret; } ! int is_local_variable(struct expression *expr) { struct symbol *sym; - char *name; ! name = expr_to_var_sym(expr, &sym); ! free_string(name); ! if (!sym || !sym->scope || !sym->scope->token || !cur_func_sym) ! return 0; ! if (cmp_pos(sym->scope->token->pos, cur_func_sym->pos) < 0) ! return 0; ! if (is_static(expr)) ! return 0; ! return 1; } int types_equiv(struct symbol *one, struct symbol *two) { if (!one && !two) --- 494,513 ---- free: free_string(name); return ret; } ! bool is_local_variable(struct expression *expr) { struct symbol *sym; ! if (!expr || expr->type != EXPR_SYMBOL || !expr->symbol) ! return false; ! sym = expr->symbol; ! if (!(sym->ctype.modifiers & MOD_TOPLEVEL)) ! return true; ! return false; } int types_equiv(struct symbol *one, struct symbol *two) { if (!one && !two)