PR cli/7719:
[deliverable/binutils-gdb.git] / bfd / verilog.c
index 175e1f0de217da9f88a8cb6f293be35220be480f..a2d3ca7855ae6fa6eb6af147ed55d801004ce0e4 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for verilog hex memory dump files.
-   Copyright 2009
+   Copyright 2009, 2010, 2011
    Free Software Foundation, Inc.
    Written by Anthony Green <green@moxielogic.com>
 
@@ -114,7 +114,7 @@ verilog_set_section_contents (bfd *abfd,
   tdata_type *tdata = abfd->tdata.verilog_data;
   verilog_data_list_type *entry;
 
-  entry = bfd_alloc (abfd, sizeof (* entry));
+  entry = (verilog_data_list_type *) bfd_alloc (abfd, sizeof (* entry));
   if (entry == NULL)
     return FALSE;
 
@@ -124,7 +124,7 @@ verilog_set_section_contents (bfd *abfd,
     {
       bfd_byte *data;
 
-      data = bfd_alloc (abfd, bytes_to_do);
+      data = (bfd_byte *) bfd_alloc (abfd, bytes_to_do);
       if (data == NULL)
        return FALSE;
       memcpy ((void *) data, location, (size_t) bytes_to_do);
@@ -222,14 +222,11 @@ verilog_write_section (bfd *abfd,
   verilog_write_address (abfd, list->where);
   while (octets_written < list->size)
     {
-      bfd_vma address;
       unsigned int octets_this_chunk = list->size - octets_written;
 
       if (octets_this_chunk > 16)
        octets_this_chunk = 16;
 
-      address = list->where + octets_written / bfd_octets_per_byte (abfd);
-
       if (! verilog_write_record (abfd,
                                  location,
                                  location + octets_this_chunk))
@@ -283,7 +280,7 @@ verilog_mkobject (bfd *abfd)
 
   verilog_init ();
 
-  tdata = bfd_alloc (abfd, sizeof (tdata_type));
+  tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type));
   if (tdata == NULL)
     return FALSE;
 
@@ -335,6 +332,7 @@ const bfd_target verilog_vec =
   0,                           /* Leading underscore.  */
   ' ',                         /* AR_pad_char.  */
   16,                          /* AR_max_namelen.  */
+  0,                           /* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,  /* Data.  */
This page took 0.024134 seconds and 4 git commands to generate.