aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/target.c14
2 files changed, 13 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 29203fe..da506b4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-03-07 Pedro Alves <palves@redhat.com>
+ * target.c (target_read_stralloc, target_fileio_read_alloc):
+ *Cast pointer to 'gdb_byte *' in target call.
+
+2013-03-07 Pedro Alves <palves@redhat.com>
+
* corefile.c (read_memory_string): Cast pointer to gdb_byte* in
call.
diff --git a/gdb/target.c b/gdb/target.c
index ecb1325..eaf8b31 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -2359,10 +2359,11 @@ char *
target_read_stralloc (struct target_ops *ops, enum target_object object,
const char *annex)
{
- gdb_byte *buffer;
+ char *buffer;
LONGEST i, transferred;
- transferred = target_read_alloc_1 (ops, object, annex, &buffer, 1);
+ transferred = target_read_alloc_1 (ops, object, annex,
+ (gdb_byte **) &buffer, 1);
if (transferred < 0)
return NULL;
@@ -2382,7 +2383,7 @@ target_read_stralloc (struct target_ops *ops, enum target_object object,
break;
}
- return (char *) buffer;
+ return buffer;
}
/* Memory transfer methods. */
@@ -3522,10 +3523,11 @@ target_fileio_read_alloc (const char *filename, gdb_byte **buf_p)
char *
target_fileio_read_stralloc (const char *filename)
{
- gdb_byte *buffer;
+ char *buffer;
LONGEST i, transferred;
- transferred = target_fileio_read_alloc_1 (filename, &buffer, 1);
+ transferred = target_fileio_read_alloc_1 (filename,
+ (gdb_byte **) &buffer, 1);
if (transferred < 0)
return NULL;
@@ -3545,7 +3547,7 @@ target_fileio_read_stralloc (const char *filename)
break;
}
- return (char *) buffer;
+ return buffer;
}