GDB copyright headers update after running GDB's copyright.py script.
[deliverable/binutils-gdb.git] / gdb / macrotab.c
index 4c5341ea98ca9b78b2c8784717e2272f408c9bc5..2caf777797736ce8d90647ec153892b300b25c01 100644 (file)
@@ -1,5 +1,5 @@
 /* C preprocessor macro tables 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.
@@ -130,7 +130,7 @@ macro_bcache (struct macro_table *t, const void *addr, int len)
 static const char *
 macro_bcache_str (struct macro_table *t, const char *s)
 {
-  return macro_bcache (t, s, strlen (s) + 1);
+  return (const char *) macro_bcache (t, s, strlen (s) + 1);
 }
 
 
@@ -352,7 +352,7 @@ new_macro_key (struct macro_table *t,
                struct macro_source_file *file,
                int line)
 {
-  struct macro_key *k = macro_alloc (sizeof (*k), t);
+  struct macro_key *k = (struct macro_key *) macro_alloc (sizeof (*k), t);
 
   memset (k, 0, sizeof (*k));
   k->table = t;
@@ -385,7 +385,8 @@ new_source_file (struct macro_table *t,
                  const char *filename)
 {
   /* Get space for the source file structure itself.  */
-  struct macro_source_file *f = macro_alloc (sizeof (*f), t);
+  struct macro_source_file *f
+    = (struct macro_source_file *) macro_alloc (sizeof (*f), t);
 
   memset (f, 0, sizeof (*f));
   f->table = t;
@@ -553,7 +554,8 @@ new_macro_definition (struct macro_table *t,
                       int argc, const char **argv,
                       const char *replacement)
 {
-  struct macro_definition *d = macro_alloc (sizeof (*d), t);
+  struct macro_definition *d
+    = (struct macro_definition *) macro_alloc (sizeof (*d), t);
 
   memset (d, 0, sizeof (*d));
   d->table = t;
@@ -568,12 +570,13 @@ new_macro_definition (struct macro_table *t,
       int cached_argv_size = argc * sizeof (*cached_argv);
 
       /* Bcache all the arguments.  */
-      cached_argv = alloca (cached_argv_size);
+      cached_argv = (const char **) alloca (cached_argv_size);
       for (i = 0; i < argc; i++)
         cached_argv[i] = macro_bcache_str (t, argv[i]);
 
       /* Now bcache the array of argument pointers itself.  */
-      d->argv = macro_bcache (t, cached_argv, cached_argv_size);
+      d->argv = ((const char * const *)
+                macro_bcache (t, cached_argv, cached_argv_size));
     }
 
   /* We don't bcache the entire definition structure because it's got
@@ -1054,9 +1057,9 @@ new_macro_table (struct obstack *obstack, struct bcache *b,
 
   /* First, get storage for the `struct macro_table' itself.  */
   if (obstack)
-    t = obstack_alloc (obstack, sizeof (*t));
+    t = XOBNEW (obstack, struct macro_table);
   else
-    t = xmalloc (sizeof (*t));
+    t = XNEW (struct macro_table);
 
   memset (t, 0, sizeof (*t));
   t->obstack = obstack;
This page took 0.028995 seconds and 4 git commands to generate.