This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Get rid of a compilation warning on som-solib.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 12 Mar 2009 19:36:16 -0700
- Subject: [commit] Get rid of a compilation warning on som-solib.c
I happened to notice a compilation warning while building pa-hpux,
and it was easy enough to fix, simply by making one of the arguments
of source.c:source_full_path_of a const.
2009-02-17 Joel Brobecker <brobecker@adacore.com>
The following patch helps getting rid of a warning inside solib-som.c.
* source.c (source_full_path_of): Constify parameter filename.
* defs.h (source_full_path_of): Update declaration accordingly.
Tested on amd64-linux. Checked in.
--
Joel
diff --git a/gdb/defs.h b/gdb/defs.h
index 845b320..001db81 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -613,7 +613,7 @@ extern void print_address (CORE_ADDR, struct ui_file *);
extern int openp (const char *, int, const char *, int, int, char **);
-extern int source_full_path_of (char *, char **);
+extern int source_full_path_of (const char *, char **);
extern void mod_path (char *, char **);
diff --git a/gdb/source.c b/gdb/source.c
index d1562ea..43df92f 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -822,7 +822,7 @@ done:
Else, this functions returns 0, and FULL_PATHNAME is set to NULL. */
int
-source_full_path_of (char *filename, char **full_pathname)
+source_full_path_of (const char *filename, char **full_pathname)
{
int fd;