public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] gas/codeview: avoid "shadowing" of glibc function name
@ 2022-12-12  8:50 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2022-12-12  8:50 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=af327b04a5560163713222ebcc94f587441be127

commit af327b04a5560163713222ebcc94f587441be127
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Dec 12 09:49:44 2022 +0100

    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:
---
 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-12  8:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12  8:50 [binutils-gdb] gas/codeview: avoid "shadowing" of glibc function name Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).