aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 8089a32..0b463e2 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -1424,7 +1424,8 @@ ada_decode_symbol (const struct general_symbol_info *arg)
gsymbol->ada_mangled = 1;
if (obstack != NULL)
- *resultp = obstack_copy0 (obstack, decoded, strlen (decoded));
+ *resultp
+ = (const char *) obstack_copy0 (obstack, decoded, strlen (decoded));
else
{
/* Sometimes, we can't find a corresponding objfile, in
@@ -2657,7 +2658,7 @@ ada_value_assign (struct value *toval, struct value *fromval)
int len = (value_bitpos (toval)
+ bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
int from_size;
- gdb_byte *buffer = alloca (len);
+ gdb_byte *buffer = (gdb_byte *) alloca (len);
struct value *val;
CORE_ADDR to_addr = value_address (toval);
@@ -4401,7 +4402,7 @@ value_pointer (struct value *value, struct type *type)
{
struct gdbarch *gdbarch = get_type_arch (type);
unsigned len = TYPE_LENGTH (type);
- gdb_byte *buf = alloca (len);
+ gdb_byte *buf = (gdb_byte *) alloca (len);
CORE_ADDR addr;
addr = value_address (value);
@@ -4596,7 +4597,8 @@ cache_symbol (const char *name, domain_enum domain, struct symbol *sym,
sizeof (*e));
e->next = sym_cache->root[h];
sym_cache->root[h] = e;
- e->name = copy = obstack_alloc (&sym_cache->cache_space, strlen (name) + 1);
+ e->name = copy
+ = (char *) obstack_alloc (&sym_cache->cache_space, strlen (name) + 1);
strcpy (copy, name);
e->sym = sym;
e->domain = domain;
@@ -4767,7 +4769,7 @@ static struct block_symbol *
defns_collected (struct obstack *obstackp, int finish)
{
if (finish)
- return obstack_finish (obstackp);
+ return (struct block_symbol *) obstack_finish (obstackp);
else
return (struct block_symbol *) obstack_base (obstackp);
}
@@ -5535,7 +5537,7 @@ add_nonlocal_symbols (struct obstack *obstackp, const char *name,
{
ALL_OBJFILES (objfile)
{
- char *name1 = alloca (strlen (name) + sizeof ("_ada_"));
+ char *name1 = (char *) alloca (strlen (name) + sizeof ("_ada_"));
strcpy (name1, "_ada_");
strcpy (name1 + sizeof ("_ada_") - 1, name);
data.objfile = objfile;
@@ -5728,7 +5730,7 @@ ada_name_for_lookup (const char *name)
if (name[0] == '<' && name[nlen - 1] == '>')
{
- canon = xmalloc (nlen - 1);
+ canon = (char *) xmalloc (nlen - 1);
memcpy (canon, name + 1, nlen - 2);
canon[nlen - 2] = '\0';
}
@@ -6329,19 +6331,19 @@ symbol_completion_add (VEC(char_ptr) **sv,
if (word == orig_text)
{
- completion = xmalloc (strlen (match) + 5);
+ completion = (char *) xmalloc (strlen (match) + 5);
strcpy (completion, match);
}
else if (word > orig_text)
{
/* Return some portion of sym_name. */
- completion = xmalloc (strlen (match) + 5);
+ completion = (char *) xmalloc (strlen (match) + 5);
strcpy (completion, match + (word - orig_text));
}
else
{
/* Return some of ORIG_TEXT plus sym_name. */
- completion = xmalloc (strlen (match) + (orig_text - word) + 5);
+ completion = (char *) xmalloc (strlen (match) + (orig_text - word) + 5);
strncpy (completion, word, orig_text - word);
completion[orig_text - word] = '\0';
strcat (completion, match);
@@ -8869,7 +8871,8 @@ ada_to_fixed_type_1 (struct type *type, const gdb_byte *valaddr,
else if (ada_type_name (fixed_record_type) != NULL)
{
const char *name = ada_type_name (fixed_record_type);
- char *xvz_name = alloca (strlen (name) + 7 /* "___XVZ\0" */);
+ char *xvz_name
+ = (char *) alloca (strlen (name) + 7 /* "___XVZ\0" */);
int xvz_found = 0;
LONGEST size;
@@ -12688,7 +12691,7 @@ ada_get_next_arg (char **argsp)
/* Make a copy of the current argument and return it. */
- result = xmalloc (end - args + 1);
+ result = (char *) xmalloc (end - args + 1);
strncpy (result, args, end - args);
result[end - args] = '\0';