From af327b04a5560163713222ebcc94f587441be127 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 12 Dec 2022 09:49:44 +0100 Subject: [PATCH] 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. --- gas/codeview.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.30.2