After leaving the code block that `buf' is defined, `buf' will not exist, so `name' will point to a variable that does not exist.
Unified · Split
| @@ -459,9 +459,8 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, · 458 unmodified lines | |||
| 459 | if (!sym->c) { | 459 | if (!sym->c) { |
| 460 | name = get_tok_str(sym->v, NULL); | 460 | name = get_tok_str(sym->v, NULL); |
| 461 | #ifdef CONFIG_TCC_BCHECK | 461 | #ifdef CONFIG_TCC_BCHECK |
| 462 | char buf[32]; | ||
| 462 | if (tcc_state->do_bounds_check) { | 463 | if (tcc_state->do_bounds_check) { |
| 463 | char buf[32]; | ||
| 464 | |||
| 465 | /* XXX: avoid doing that for statics ? */ | 464 | /* XXX: avoid doing that for statics ? */ |
| 466 | /* if bound checking is activated, we change some function | 465 | /* if bound checking is activated, we change some function |
| 467 | names by adding the "__bound" prefix */ | 466 | names by adding the "__bound" prefix */ |