Print this page
11506 smatch resync

*** 82,101 **** struct sm_state *set_state(int owner, const char *name, struct symbol *sym, struct smatch_state *state) { struct sm_state *ret; ! if (!name) return NULL; if (read_only) sm_perror("cur_stree is read only."); if (option_debug || strcmp(check_name(owner), option_debug_check) == 0) { struct smatch_state *s; ! s = get_state(owner, name, sym); if (!s) sm_msg("%s new [%s] '%s' %s", __func__, check_name(owner), name, show_state(state)); else sm_msg("%s change [%s] '%s' %s => %s", --- 82,101 ---- struct sm_state *set_state(int owner, const char *name, struct symbol *sym, struct smatch_state *state) { struct sm_state *ret; ! if (!name || !state) return NULL; if (read_only) sm_perror("cur_stree is read only."); if (option_debug || strcmp(check_name(owner), option_debug_check) == 0) { struct smatch_state *s; ! s = __get_state(owner, name, sym); if (!s) sm_msg("%s new [%s] '%s' %s", __func__, check_name(owner), name, show_state(state)); else sm_msg("%s change [%s] '%s' %s => %s",
*** 194,204 **** if (option_debug || strcmp(check_name(sm->owner), option_debug_check) == 0) { struct smatch_state *s; ! s = get_state(sm->owner, sm->name, sm->sym); if (!s) sm_msg("%s new %s", __func__, show_sm(sm)); else sm_msg("%s change %s (was %s)", __func__, show_sm(sm), show_state(s)); --- 194,204 ---- if (option_debug || strcmp(check_name(sm->owner), option_debug_check) == 0) { struct smatch_state *s; ! s = __get_state(sm->owner, sm->name, sm->sym); if (!s) sm_msg("%s new %s", __func__, show_sm(sm)); else sm_msg("%s change %s (was %s)", __func__, show_sm(sm), show_state(s));
*** 220,230 **** if (option_debug || strcmp(check_name(sm->owner), option_debug_check) == 0) { struct smatch_state *s; ! s = get_state(sm->owner, sm->name, sm->sym); if (!s) sm_msg("%s new %s", __func__, show_sm(sm)); else sm_msg("%s change %s (was %s)", __func__, show_sm(sm), show_state(s)); --- 220,230 ---- if (option_debug || strcmp(check_name(sm->owner), option_debug_check) == 0) { struct smatch_state *s; ! s = __get_state(sm->owner, sm->name, sm->sym); if (!s) sm_msg("%s new %s", __func__, show_sm(sm)); else sm_msg("%s change %s (was %s)", __func__, show_sm(sm), show_state(s));
*** 243,253 **** if (option_debug || strcmp(check_name(sm->owner), option_debug_check) == 0) { struct smatch_state *s; ! s = get_state(sm->owner, sm->name, sm->sym); if (!s) sm_msg("%s new %s", __func__, show_sm(sm)); else sm_msg("%s change %s (was %s)", __func__, show_sm(sm), show_state(s)); --- 243,253 ---- if (option_debug || strcmp(check_name(sm->owner), option_debug_check) == 0) { struct smatch_state *s; ! s = __get_state(sm->owner, sm->name, sm->sym); if (!s) sm_msg("%s new %s", __func__, show_sm(sm)); else sm_msg("%s change %s (was %s)", __func__, show_sm(sm), show_state(s));
*** 475,485 **** sm_perror("cur_stree is read only."); if (option_debug || strcmp(check_name(owner), option_debug_check) == 0) { struct smatch_state *tmp; ! tmp = get_state(owner, name, sym); sm_msg("%s [%s] '%s'. Was %s. Now T:%s F:%s", __func__, check_name(owner), name, show_state(tmp), show_state(true_state), show_state(false_state)); } --- 475,485 ---- sm_perror("cur_stree is read only."); if (option_debug || strcmp(check_name(owner), option_debug_check) == 0) { struct smatch_state *tmp; ! tmp = __get_state(owner, name, sym); sm_msg("%s [%s] '%s'. Was %s. Now T:%s F:%s", __func__, check_name(owner), name, show_state(tmp), show_state(true_state), show_state(false_state)); }
*** 529,539 **** name = true_sm ? true_sm->name : false_sm->name; sym = true_sm ? true_sm->sym : false_sm->sym; if (option_debug || strcmp(check_name(owner), option_debug_check) == 0) { struct smatch_state *tmp; ! tmp = get_state(owner, name, sym); sm_msg("%s [%s] '%s'. Was %s. Now T:%s F:%s", __func__, check_name(owner), name, show_state(tmp), show_state(true_sm ? true_sm->state : NULL), show_state(false_sm ? false_sm->state : NULL)); } --- 529,539 ---- name = true_sm ? true_sm->name : false_sm->name; sym = true_sm ? true_sm->sym : false_sm->sym; if (option_debug || strcmp(check_name(owner), option_debug_check) == 0) { struct smatch_state *tmp; ! tmp = __get_state(owner, name, sym); sm_msg("%s [%s] '%s'. Was %s. Now T:%s F:%s", __func__, check_name(owner), name, show_state(tmp), show_state(true_sm ? true_sm->state : NULL), show_state(false_sm ? false_sm->state : NULL)); }
*** 787,797 **** void __negate_cond_stacks(void) { struct stree *old_false, *old_true; - __use_cond_stack(&cond_false_stack); old_false = pop_stree(&cond_false_stack); old_true = pop_stree(&cond_true_stack); push_stree(&cond_false_stack, old_true); push_stree(&cond_true_stack, old_false); } --- 787,796 ----