summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/i386-sol2-tdep.c3
-rw-r--r--gdb/machoread.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 04cd47d43cd..72555330412 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2015-03-20 Pedro Alves <palves@redhat.com>
+ * i386-sol2-tdep.c (i386_sol2_static_transform_name): Move "p" to
+ inner block and make it const.
+ * machoread.c (get_archive_prefix_len): Make "lparen" const.
+
+2015-03-20 Pedro Alves <palves@redhat.com>
+
* breakpoint.c (set_breakpoint_condition): Make argument "exp" const.
* breakpoint.h (set_breakpoint_condition): Update declaration.
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index af783dfc634..59f9be76e64 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -80,9 +80,10 @@ i386_sol2_mcontext_addr (struct frame_info *this_frame)
static const char *
i386_sol2_static_transform_name (const char *name)
{
- char *p;
if (name[0] == '.')
{
+ const char *p;
+
/* For file-local statics there will be a period, a bunch of
junk (the contents of which match a string given in the
N_OPT), a period and the name. For function-local statics
diff --git a/gdb/machoread.c b/gdb/machoread.c
index 831bbcb622e..675155e97b6 100644
--- a/gdb/machoread.c
+++ b/gdb/machoread.c
@@ -343,7 +343,7 @@ macho_symtab_read (struct objfile *objfile,
static int
get_archive_prefix_len (const char *name)
{
- char *lparen;
+ const char *lparen;
int name_len = strlen (name);
if (name_len == 0 || name[name_len - 1] != ')')