diff options
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-cmd.c | 6 | ||||
-rw-r--r-- | gdb/python/py-gdb-readline.c | 4 | ||||
-rw-r--r-- | gdb/python/py-symtab.c | 5 | ||||
-rw-r--r-- | gdb/python/py-unwind.c | 6 | ||||
-rw-r--r-- | gdb/python/python.c | 4 |
5 files changed, 14 insertions, 11 deletions
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index b11fc32..303aecb 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -452,7 +452,7 @@ gdbpy_parse_command_name (const char *name, || name[i - 1] == '_'); --i) ; - result = xmalloc (lastchar - i + 2); + result = (char *) xmalloc (lastchar - i + 2); memcpy (result, &name[i], lastchar - i + 1); result[lastchar - i + 1] = '\0'; @@ -465,7 +465,7 @@ gdbpy_parse_command_name (const char *name, return result; } - prefix_text = xmalloc (i + 2); + prefix_text = (char *) xmalloc (i + 2); memcpy (prefix_text, name, i + 1); prefix_text[i + 1] = '\0'; @@ -574,7 +574,7 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw) int i, out; /* Make a normalized form of the command name. */ - pfx_name = xmalloc (strlen (name) + 2); + pfx_name = (char *) xmalloc (strlen (name) + 2); i = 0; out = 0; diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c index 0cf4dfd..df14e28 100644 --- a/gdb/python/py-gdb-readline.c +++ b/gdb/python/py-gdb-readline.c @@ -63,7 +63,7 @@ gdbpy_readline_wrapper (FILE *sys_stdin, FILE *sys_stdout, /* Detect EOF (Ctrl-D). */ if (p == NULL) { - q = PyMem_Malloc (1); + q = (char *) PyMem_Malloc (1); if (q != NULL) q[0] = '\0'; return q; @@ -72,7 +72,7 @@ gdbpy_readline_wrapper (FILE *sys_stdin, FILE *sys_stdout, n = strlen (p); /* Copy the line to Python and return. */ - q = PyMem_Malloc (n + 2); + q = (char *) PyMem_Malloc (n + 2); if (q != NULL) { strncpy (q, p, n); diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c index 7c428a4..f0ae036 100644 --- a/gdb/python/py-symtab.c +++ b/gdb/python/py-symtab.c @@ -370,8 +370,9 @@ set_sal (sal_object *sal_obj, struct symtab_and_line sal) Py_INCREF (Py_None); } - sal_obj->sal = xmemdup (&sal, sizeof (struct symtab_and_line), - sizeof (struct symtab_and_line)); + sal_obj->sal = ((struct symtab_and_line *) + xmemdup (&sal, sizeof (struct symtab_and_line), + sizeof (struct symtab_and_line))); sal_obj->symtab = symtab_obj; sal_obj->prev = NULL; diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index 18f8f4d..523cb76 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -572,8 +572,10 @@ pyuw_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, saved_reg *reg; int i; - cached_frame = xmalloc (sizeof (*cached_frame) + - reg_count * sizeof (cached_frame->reg[0])); + cached_frame + = ((cached_frame_info *) + xmalloc (sizeof (*cached_frame) + + reg_count * sizeof (cached_frame->reg[0]))); cached_frame->gdbarch = gdbarch; cached_frame->frame_id = unwind_info->frame_id; cached_frame->reg_count = reg_count; diff --git a/gdb/python/python.c b/gdb/python/python.c index 3a33c75..2031c0c 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -341,7 +341,7 @@ python_interactive_command (char *arg, int from_tty) if (arg && *arg) { int len = strlen (arg); - char *script = xmalloc (len + 2); + char *script = (char *) xmalloc (len + 2); strcpy (script, arg); script[len] = '\n'; @@ -428,7 +428,7 @@ compute_python_string (struct command_line *l) for (iter = l; iter; iter = iter->next) size += strlen (iter->line) + 1; - script = xmalloc (size + 1); + script = (char *) xmalloc (size + 1); here = 0; for (iter = l; iter; iter = iter->next) { |