aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-cmds.c4
-rw-r--r--gdb/cli/cli-dump.c4
-rw-r--r--gdb/cli/cli-interp.c3
-rw-r--r--gdb/cli/cli-script.c4
-rw-r--r--gdb/cli/cli-setshow.c2
5 files changed, 9 insertions, 8 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index aa9a9a5..424bf5e 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -277,7 +277,7 @@ complete_command (char *arg, int from_tty)
point--;
}
- arg_prefix = alloca (point - arg + 1);
+ arg_prefix = (char *) alloca (point - arg + 1);
memcpy (arg_prefix, arg, point - arg);
arg_prefix[point - arg] = 0;
@@ -1295,7 +1295,7 @@ make_command (char *arg, int from_tty)
p = "make";
else
{
- p = xmalloc (sizeof ("make ") + strlen (arg));
+ p = (char *) xmalloc (sizeof ("make ") + strlen (arg));
strcpy (p, "make ");
strcpy (p + sizeof ("make ") - 1, arg);
}
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 2449dc5..aabe3e3 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -482,7 +482,7 @@ restore_section_callback (bfd *ibfd, asection *isec, void *args)
sec_load_count -= sec_end - data->load_end;
/* Get the data. */
- buf = xmalloc (size);
+ buf = (gdb_byte *) xmalloc (size);
old_chain = make_cleanup (xfree, buf);
if (!bfd_get_section_contents (ibfd, isec, buf, 0, size))
error (_("Failed to read bfd file %s: '%s'."), bfd_get_filename (ibfd),
@@ -553,7 +553,7 @@ restore_binary_file (const char *filename, struct callback_data *data)
perror_with_name (filename);
/* Now allocate a buffer and read the file contents. */
- buf = xmalloc (len);
+ buf = (gdb_byte *) xmalloc (len);
make_cleanup (xfree, buf);
if (fread (buf, 1, len, file) != len)
perror_with_name (filename);
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 174a10b..7df7c14 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -174,7 +174,8 @@ cli_interpreter_exec (void *data, const char *command_str)
/* FIXME: cagney/2003-02-01: Need to const char *propogate
safe_execute_command. */
- char *str = strcpy (alloca (strlen (command_str) + 1), command_str);
+ char *str = (char *) alloca (strlen (command_str) + 1);
+ strcpy (str, command_str);
/* gdb_stdout could change between the time cli_uiout was
initialized and now. Since we're probably using a different
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 1717240..624a493 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -484,7 +484,7 @@ execute_control_command (struct command_line *cmd)
case while_control:
{
int len = strlen (cmd->line) + 7;
- char *buffer = alloca (len);
+ char *buffer = (char *) alloca (len);
xsnprintf (buffer, len, "while %s", cmd->line);
print_command_trace (buffer);
@@ -553,7 +553,7 @@ execute_control_command (struct command_line *cmd)
case if_control:
{
int len = strlen (cmd->line) + 4;
- char *buffer = alloca (len);
+ char *buffer = (char *) alloca (len);
xsnprintf (buffer, len, "if %s", cmd->line);
print_command_trace (buffer);
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 64f09f2..9439f48fb 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -373,7 +373,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
for (i = 0; c->enums[i]; i++)
msg_len += strlen (c->enums[i]) + 2;
- msg = xmalloc (msg_len);
+ msg = (char *) xmalloc (msg_len);
*msg = '\0';
make_cleanup (xfree, msg);