c_value_print: Revert 'val' to a reference for TYPE_CODE_STRUCT
[deliverable/binutils-gdb.git] / gdb / macroexp.c
index e6c9c86c30a5a519248197c2d4c066c0d6dc94e4..e132a3bc26ca62f1e98236c94f13587aa337bfea 100644 (file)
@@ -1,5 +1,5 @@
 /* C preprocessor macro expansion for GDB.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of GDB.
@@ -146,7 +146,7 @@ resize_buffer (struct macro_buffer *b, int n)
     while (b->size <= n)
       b->size *= 2;
 
-  b->text = xrealloc (b->text, b->size);
+  b->text = (char *) xrealloc (b->text, b->size);
 }
 
 
@@ -825,7 +825,7 @@ gather_arguments (const char *name, struct macro_buffer *src,
       if (args_len >= args_size)
         {
           args_size *= 2;
-          args = xrealloc (args, sizeof (*args) * args_size);
+          args = XRESIZEVEC (struct macro_buffer, args, args_size);
         }
 
       /* Initialize the next argument.  */
@@ -858,7 +858,8 @@ gather_arguments (const char *name, struct macro_buffer *src,
                      if (args_len >= args_size)
                        {
                          args_size++;
-                         args = xrealloc (args, sizeof (*args) * args_size);
+                         args = XRESIZEVEC (struct macro_buffer, args,
+                                            args_size);
                        }
                      arg = &args[args_len++];
                      set_token (arg, src->text, src->text);
@@ -1330,7 +1331,7 @@ maybe_expand (struct macro_buffer *dest,
     {
       /* Make a null-terminated copy of it, since that's what our
          lookup function expects.  */
-      char *id = xmalloc (src_first->len + 1);
+      char *id = (char *) xmalloc (src_first->len + 1);
       struct cleanup *back_to = make_cleanup (xfree, id);
 
       memcpy (id, src_first->text, src_first->len);
This page took 0.026048 seconds and 4 git commands to generate.