aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-10-09 14:31:15 -0600
committerTom Tromey <tom@tromey.com>2018-11-19 15:45:28 -0700
commit0614ef69be074fcfb2dc4e7b0e3b9c715a9b44ee (patch)
tree557002d37f5e339659ac78e891e38b55e3bd7493
parent261f6f7962e3fab7cad813a8821f00cd0173f88f (diff)
downloadfsf-binutils-gdb-0614ef69be074fcfb2dc4e7b0e3b9c715a9b44ee.zip
fsf-binutils-gdb-0614ef69be074fcfb2dc4e7b0e3b9c715a9b44ee.tar.gz
fsf-binutils-gdb-0614ef69be074fcfb2dc4e7b0e3b9c715a9b44ee.tar.bz2
Change get_filename_and_charpos to return void
The return value from get_filename_and_charpos is never used, so this patch changes it to return void. gdb/ChangeLog 2018-11-19 Tom Tromey <tom@tromey.com> * source.c (get_filename_and_charpos): Return void.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/source.c14
2 files changed, 6 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8f5e64c..6973f42 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-11-19 Tom Tromey <tom@tromey.com>
+
+ * source.c (get_filename_and_charpos): Return void.
+
2018-11-19 Simon Marchi <simon.marchi@polymtl.ca>
* skip.c (_initialize_step_skip): Fix "info skip" help.
diff --git a/gdb/source.c b/gdb/source.c
index 59f00fc..b38eed5 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -49,10 +49,6 @@
#define OPEN_MODE (O_RDONLY | O_BINARY)
#define FDOPEN_MODE FOPEN_RB
-/* Prototypes for local functions. */
-
-static int get_filename_and_charpos (struct symtab *, char **);
-
/* Path of directories to search for source files.
Same format as the PATH environment variable's value. */
@@ -1209,29 +1205,23 @@ find_source_lines (struct symtab *s, int desc)
/* Get full pathname and line number positions for a symtab.
- Return nonzero if line numbers may have changed.
Set *FULLNAME to actual name of the file as found by `openp',
or to 0 if the file is not found. */
-static int
+static void
get_filename_and_charpos (struct symtab *s, char **fullname)
{
- int linenums_changed = 0;
-
scoped_fd desc = open_source_file (s);
if (desc.get () < 0)
{
if (fullname)
*fullname = NULL;
- return 0;
+ return;
}
if (fullname)
*fullname = s->fullname;
if (s->line_charpos == 0)
- linenums_changed = 1;
- if (linenums_changed)
find_source_lines (s, desc.get ());
- return linenums_changed;
}
/* Print text describing the full name of the source file S