libtcc.c (put_extern_sym2): Extend the scope of buf to match its use

After leaving the code block that `buf' is defined, `buf' will not
exist, so `name' will point to a variable that does not exist.
master
Lee Duhem 2014-12-11 09:46:36 +08:00
parent 4bf3f6c965
commit f1703e2b2f
1 changed files with 1 additions and 2 deletions

View File

@ -459,9 +459,8 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
if (!sym->c) {
name = get_tok_str(sym->v, NULL);
#ifdef CONFIG_TCC_BCHECK
char buf[32];
if (tcc_state->do_bounds_check) {
char buf[32];
/* XXX: avoid doing that for statics ? */
/* if bound checking is activated, we change some function
names by adding the "__bound" prefix */