This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[obv] Code cleanup: char * -> const char *
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 10 Jan 2013 22:16:44 +0100
- Subject: [obv] Code cleanup: char * -> const char *
http://sourceware.org/ml/gdb-cvs/2013-01/msg00053.html
--- src/gdb/ChangeLog 2013/01/09 21:51:17 1.15005
+++ src/gdb/ChangeLog 2013/01/10 21:15:44 1.15006
@@ -1,3 +1,12 @@
+2013-01-10 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup.
+ * psymtab.c (psymtab_to_fullname, psymtab_to_fullname): Make the return
+ type const char *.
+ * tui/tui-source.c (tui_source_is_displayed): Make the parameter fname
+ const char *.
+ * tui/tui-source.h (tui_source_is_displayed): Likewise.
+
2013-01-09 Anthony Green <green@moxielogic.com>
* cp-abi.c (cplus_print_vtable): Don't return value from void
--- src/gdb/psymtab.c 2013/01/09 20:46:03 1.58
+++ src/gdb/psymtab.c 2013/01/10 21:15:51 1.59
@@ -58,7 +58,7 @@
const char *, int,
domain_enum);
-static char *psymtab_to_fullname (struct partial_symtab *ps);
+static const char *psymtab_to_fullname (struct partial_symtab *ps);
static struct partial_symbol *find_pc_sect_psymbol (struct objfile *,
struct partial_symtab *,
@@ -1174,7 +1174,7 @@
If this function fails to find the file that this partial_symtab represents,
NULL will be returned and ps->fullname will be set to NULL. */
-static char *
+static const char *
psymtab_to_fullname (struct partial_symtab *ps)
{
int r;
--- src/gdb/tui/tui-source.c 2013/01/01 06:41:30 1.33
+++ src/gdb/tui/tui-source.c 2013/01/10 21:15:51 1.34
@@ -332,7 +332,7 @@
/* Answer whether the source is currently displayed in the source
window. */
int
-tui_source_is_displayed (char *fname)
+tui_source_is_displayed (const char *fname)
{
return (TUI_SRC_WIN != NULL
&& TUI_SRC_WIN->generic.content_in_use
--- src/gdb/tui/tui-source.h 2013/01/01 06:41:30 1.15
+++ src/gdb/tui/tui-source.h 2013/01/10 21:15:51 1.16
@@ -35,7 +35,7 @@
extern void tui_show_symtab_source (struct gdbarch *, struct symtab *,
struct tui_line_or_address,
int);
-extern int tui_source_is_displayed (char *);
+extern int tui_source_is_displayed (const char *);
extern void tui_vertical_source_scroll (enum tui_scroll_direction,
int);