From: Jan Beulich Date: Mon, 12 Dec 2022 08:49:44 +0000 (+0100) Subject: gas/codeview: avoid "shadowing" of glibc function name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af327b04a5560163713222ebcc94f587441be127;p=binutils-gdb.git 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. --- diff --git a/gas/codeview.c b/gas/codeview.c index 13f1a3a3223..15764028d73 100644 --- a/gas/codeview.c +++ b/gas/codeview.c @@ -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;