Skip to content

Commit c256c39

Browse files
committed
Fix shadowed local variable 'file' in tcc_tool_ar
1 parent 4fccaf6 commit c256c39

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tcctools.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ST_FUNC int tcc_tool_ar(int argc, char **argv)
8181
int *afpos = NULL;
8282
int istrlen, strpos = 0, fpos = 0, funccnt = 0, funcmax, hofs;
8383
char tfile[260], stmp[20];
84-
char *file, *name;
84+
char *ar_file, *name;
8585
int ret = 2;
8686
const char *ops_conflict = "habdiopN"; // unsupported but destructive if ignored.
8787
int extract = 0;
@@ -272,9 +272,9 @@ ST_FUNC int tcc_tool_ar(int argc, char **argv)
272272
}
273273
}
274274

275-
file = argv[i_obj];
276-
for (name = strchr(file, 0);
277-
name > file && name[-1] != '/' && name[-1] != '\\';
275+
ar_file = argv[i_obj];
276+
for (name = strchr(ar_file, 0);
277+
name > ar_file && name[-1] != '/' && name[-1] != '\\';
278278
--name);
279279
istrlen = strlen(name);
280280
if (istrlen >= sizeof(arhdro.ar_name))

0 commit comments

Comments
 (0)