public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: Remove unused parameter
@ 2019-06-15 20:58 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2019-06-15 20:58 UTC (permalink / raw)
  To: gdb-cvs

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

commit afda45a206f83389782a400f86668714400a1cb7
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Fri Jun 14 21:57:42 2019 +0100

    gdb: Remove unused parameter
    
    The parameter 'fullname' is always passed as NULL to the function
    get_filename_and_charpos in source.c, so lets remove the parameter.
    There should be no user visible changes after this commit.
    
    gdb/ChangeLog:
    
    	* source.c (get_filename_and_charpos): Remove fullname
    	parameter.
    	(identify_source_line): Update call to get_filename_and_charpos.

Diff:
---
 gdb/ChangeLog |  6 ++++++
 gdb/source.c  | 12 +++---------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 702aa7f..83916ef 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-15  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+	* source.c (get_filename_and_charpos): Remove fullname
+	parameter.
+	(identify_source_line): Update call to get_filename_and_charpos.
+
 2019-06-14  Tom Tromey  <tromey@adacore.com>
 
 	PR gdb/24502:
diff --git a/gdb/source.c b/gdb/source.c
index 02df15a..5fa55e2 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1201,17 +1201,11 @@ find_source_lines (struct symtab *s, int desc)
    or to 0 if the file is not found.  */
 
 static void
-get_filename_and_charpos (struct symtab *s, char **fullname)
+get_filename_and_charpos (struct symtab *s)
 {
   scoped_fd desc = open_source_file (s);
   if (desc.get () < 0)
-    {
-      if (fullname)
-	*fullname = NULL;
-      return;
-    }
-  if (fullname)
-    *fullname = s->fullname;
+    return;
   if (s->line_charpos == 0)
     find_source_lines (s, desc.get ());
 }
@@ -1223,7 +1217,7 @@ identify_source_line (struct symtab *s, int line, int mid_statement,
 		      CORE_ADDR pc)
 {
   if (s->line_charpos == 0)
-    get_filename_and_charpos (s, (char **) NULL);
+    get_filename_and_charpos (s);
   if (s->fullname == 0)
     return 0;
   if (line > s->nlines)


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

only message in thread, other threads:[~2019-06-15 20:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-15 20:58 [binutils-gdb] gdb: Remove unused parameter Andrew Burgess

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).