diff options
author | Jeff Law <law@redhat.com> | 1994-02-10 05:36:41 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1994-02-10 05:36:41 +0000 |
commit | a62dd44f9c613086e94018d714764e56cf473ad5 (patch) | |
tree | 202a3017a5fb5e308e9bcd20a3bad2b883d3d208 /bfd | |
parent | 0d634116b2a6b21b5c1a89adc12b216590a3dbc3 (diff) | |
download | gdb-a62dd44f9c613086e94018d714764e56cf473ad5.zip gdb-a62dd44f9c613086e94018d714764e56cf473ad5.tar.gz gdb-a62dd44f9c613086e94018d714764e56cf473ad5.tar.bz2 |
* som.c: Cast return values from BFD memory allocation routines to
avoid warnings from the HP compiler.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/som.c | 19 |
2 files changed, 15 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 35825c0..11bd45b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Wed Feb 9 21:34:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * som.c: Cast return values from BFD memory allocation routines to + avoid warnings from the HP compiler. + Wed Feb 9 12:55:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * coff-alpha.c (alpha_relocate_section): Accept a LITERAL @@ -1822,7 +1822,8 @@ som_mkobject (abfd) bfd_error = no_memory; return false; } - obj_som_file_hdr (abfd) = bfd_zalloc (abfd, sizeof (struct header)); + obj_som_file_hdr (abfd) + = (struct header *) bfd_zalloc (abfd, sizeof (struct header)); if (obj_som_file_hdr (abfd) == NULL) { @@ -3878,8 +3879,8 @@ som_new_section_hook (abfd, newsect) bfd *abfd; asection *newsect; { - newsect->used_by_bfd = (struct som_section_data_struct *) - bfd_zalloc (abfd, sizeof (struct som_section_data_struct)); + newsect->used_by_bfd + = (PTR) bfd_zalloc (abfd, sizeof (struct som_section_data_struct)); newsect->alignment_power = 3; /* Initialize the subspace_index field to -1 so that it does @@ -3973,9 +3974,9 @@ bfd_som_attach_aux_hdr (abfd, type, string) if (len % 4) pad = (4 - (len % 4)); - obj_som_version_hdr (abfd) - = bfd_zalloc (abfd, sizeof (struct aux_id) - + sizeof (unsigned int) + len + pad); + obj_som_version_hdr (abfd) = (struct user_string_aux_hdr *) + bfd_zalloc (abfd, sizeof (struct aux_id) + + sizeof (unsigned int) + len + pad); obj_som_version_hdr (abfd)->header_id.type = VERSION_AUX_ID; obj_som_version_hdr (abfd)->header_id.length = len + pad; obj_som_version_hdr (abfd)->header_id.length += sizeof (int); @@ -3989,9 +3990,9 @@ bfd_som_attach_aux_hdr (abfd, type, string) if (len % 4) pad = (4 - (len % 4)); - obj_som_copyright_hdr (abfd) - = bfd_zalloc (abfd, sizeof (struct aux_id) - + sizeof (unsigned int) + len + pad); + obj_som_copyright_hdr (abfd) = (struct copyright_aux_hdr *) + bfd_zalloc (abfd, sizeof (struct aux_id) + + sizeof (unsigned int) + len + pad); obj_som_copyright_hdr (abfd)->header_id.type = COPYRIGHT_AUX_ID; obj_som_copyright_hdr (abfd)->header_id.length = len + pad; obj_som_copyright_hdr (abfd)->header_id.length += sizeof (int); |