gas/codeview: avoid "shadowing" of glibc function name

While not "index" this time, old enough glibc also has an (unguarded)
declaration of fileno() in stdio.h, which triggers a "shadows a global
declaration" warning with our choice of warning level and with at least
some gcc versions.
This commit is contained in:
Jan Beulich 2022-12-12 09:49:44 +01:00
parent 65f440c8fb
commit af327b04a5

View File

@ -452,7 +452,7 @@ void
codeview_generate_asm_lineno (void)
{
const char *file;
unsigned int fileno;
unsigned int filenr;
unsigned int lineno;
struct line *l;
symbolS *sym = NULL;
@ -461,7 +461,7 @@ codeview_generate_asm_lineno (void)
file = as_where (&lineno);
fileno = get_fileno (file);
filenr = get_fileno (file);
if (!blocks_tail || blocks_tail->frag != frag_now)
{
@ -492,11 +492,11 @@ codeview_generate_asm_lineno (void)
lb = blocks_tail;
}
if (!lb->files_tail || lb->files_tail->fileno != fileno)
if (!lb->files_tail || lb->files_tail->fileno != filenr)
{
lf = xmalloc (sizeof (struct line_file));
lf->next = NULL;
lf->fileno = fileno;
lf->fileno = filenr;
lf->lines_head = lf->lines_tail = NULL;
lf->num_lines = 0;