daily update
[deliverable/binutils-gdb.git] / bfd / archive.c
index e6c1e8385324d0930fd095aa54297a8db6d5c91e..1b3f69215ec75137dbf4d1113bbd73d5a5275f50 100644 (file)
@@ -303,6 +303,15 @@ eq_file_ptr (const PTR p1, const PTR p2)
   return arc1->ptr == arc2->ptr;
 }
 
+/* The calloc function doesn't always take size_t (e.g. on VMS)
+   so wrap it to avoid a compile time warning.   */
+
+static void *
+_bfd_calloc_wrapper (size_t a, size_t b)
+{
+  return calloc (a, b);
+}
+
 /* Kind of stupid to call cons for each one, but we don't do too many.  */
 
 bfd_boolean
@@ -315,7 +324,7 @@ _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
   if (hash_table == NULL)
     {
       hash_table = htab_create_alloc (16, hash_file_ptr, eq_file_ptr,
-                                     NULL, calloc, free);
+                                     NULL, _bfd_calloc_wrapper, free);
       if (hash_table == NULL)
        return FALSE;
       bfd_ardata (arch_bfd)->cache = hash_table;
@@ -1640,7 +1649,7 @@ _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
 
           len = (len + 3) & ~3;
           arch_eltdata (current)->extra_size = len;
-          _bfd_ar_spacepad (hdr->ar_name, maxname, "#1/%u", len);
+          _bfd_ar_spacepad (hdr->ar_name, maxname, "#1/%lu", len);
        }
     }
 
This page took 0.02411 seconds and 4 git commands to generate.