2010-09-17 Tejas Belagod <tejas.belagod@arm.com>
[deliverable/binutils-gdb.git] / bfd / verilog.c
index 175e1f0de217da9f88a8cb6f293be35220be480f..551e5c42803f97b8f0c87dd68da7e265e07f5fde 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for verilog hex memory dump files.
-   Copyright 2009
+   Copyright 2009, 2010
    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;
 
This page took 0.024059 seconds and 4 git commands to generate.