(m32r_handle_align): Declare type of fragp.
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index 3fee0cfc64d6a958f7ae9c43da39ee021a2ac561..26d9059ae4822a004349fbcd50375acf91bbc10b 100644 (file)
@@ -82,7 +82,7 @@ struct extra
   {
     char str[128];
     int len;
-  };                           /* maximum extention is 128! FIXME */
+  };                           /* maximum extension is 128! FIXME */
 
 static void add_name (struct extra *, char *);
 static void add_mangled_type (struct extra *, struct type *);
@@ -1352,7 +1352,7 @@ cfront_mangle_name (struct type *type, int i, int j)
        printf ("add_mangled_type: %s\n", extras.str);  /* FIXME */
       arm_mangled_name = malloc (strlen (mangled_name) + extras.len);
       sprintf (arm_mangled_name, "%s%s", mangled_name, extras.str);
-      free (mangled_name);
+      xfree (mangled_name);
       mangled_name = arm_mangled_name;
     }
 }
@@ -1484,7 +1484,7 @@ check_stub_method (struct type *type, int method_id, int signature_id)
       argtypes[argcount] = NULL;       /* Ellist terminator */
     }
 
-  free (demangled_name);
+  xfree (demangled_name);
 
   f = TYPE_FN_FIELDLIST1 (type, method_id);
 
@@ -1835,7 +1835,7 @@ virtual_base_list (struct type *dclass)
   while (tmp_vbase)
     {
       tmp_vbase = tmp_vbase->next;
-      free (tmp_vbase_2);
+      xfree (tmp_vbase_2);
       tmp_vbase_2 = tmp_vbase;
     }
 
@@ -1986,6 +1986,8 @@ count_virtual_fns (struct type *dclass)
   struct type *pbc = primary_base_class (dclass);
   if (pbc)
     vfuncs = count_virtual_fns (pbc);
+  else
+    vfuncs = 0;
 
   for (fn = 0; fn < TYPE_NFN_FIELDS (dclass); fn++)
     for (oi = 0; oi < TYPE_FN_FIELDLIST_LENGTH (dclass, fn); oi++)
@@ -2929,7 +2931,7 @@ build_gdbtypes (void)
      though the two can be different (cf d10v) */
   builtin_type_ptr = make_pointer_type (builtin_type_void, NULL);
   builtin_type_CORE_ADDR =
-    init_type (TYPE_CODE_INT, TARGET_PTR_BIT / 8,
+    init_type (TYPE_CODE_INT, TARGET_ADDR_BIT / 8,
               TYPE_FLAG_UNSIGNED,
               "__CORE_ADDR", (struct objfile *) NULL);
   builtin_type_bfd_vma =
This page took 0.023645 seconds and 4 git commands to generate.