aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-05-10 22:57:13 +0930
committerAlan Modra <amodra@gmail.com>2022-05-13 14:32:54 +0930
commit845cbaa9ffbfd6a1f7976a6c7f3e4461e4d41993 (patch)
treecd44d6acbd57ee37cd21d7585d052f9737e04371 /sim/ppc
parentd112ec9673d92b43dfef868460b7361d5c6bb06c (diff)
downloadgdb-845cbaa9ffbfd6a1f7976a6c7f3e4461e4d41993.zip
gdb-845cbaa9ffbfd6a1f7976a6c7f3e4461e4d41993.tar.gz
gdb-845cbaa9ffbfd6a1f7976a6c7f3e4461e4d41993.tar.bz2
sim: remove use of PTR
PTR will soon disappear from ansidecl.h. Remove uses in sim. Where a PTR cast is used in assignment or function args to a void* I've simply removed the unnecessary (in C) cast rather than replacing with (void *).
Diffstat (limited to 'sim/ppc')
-rw-r--r--sim/ppc/emul_chirp.c2
-rw-r--r--sim/ppc/hw_htab.c8
-rw-r--r--sim/ppc/hw_init.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c
index a72a34e..7a58538 100644
--- a/sim/ppc/emul_chirp.c
+++ b/sim/ppc/emul_chirp.c
@@ -1492,7 +1492,7 @@ typedef struct _chirp_note_head {
static void
map_over_chirp_note(bfd *image,
asection *sect,
- PTR obj)
+ void *obj)
{
chirp_note *note = (chirp_note*)obj;
if (strcmp(sect->name, ".note") == 0) {
diff --git a/sim/ppc/hw_htab.c b/sim/ppc/hw_htab.c
index ce09834..b4537fc 100644
--- a/sim/ppc/hw_htab.c
+++ b/sim/ppc/hw_htab.c
@@ -388,7 +388,7 @@ typedef struct _htab_binary_sizes {
static void
htab_sum_binary(bfd *abfd,
sec_ptr sec,
- PTR data)
+ void *data)
{
htab_binary_sizes *sizes = (htab_binary_sizes*)data;
unsigned_word size = bfd_section_size (sec);
@@ -422,7 +422,7 @@ htab_sum_binary(bfd *abfd,
static void
htab_dma_binary(bfd *abfd,
sec_ptr sec,
- PTR data)
+ void *data)
{
htab_binary_sizes *sizes = (htab_binary_sizes*)data;
void *section_init;
@@ -526,7 +526,7 @@ htab_map_binary(device *me,
}
/* determine the size of each of the files regions */
- bfd_map_over_sections (image, htab_sum_binary, (PTR) &sizes);
+ bfd_map_over_sections (image, htab_sum_binary, &sizes);
/* if needed, determine the real addresses of the sections */
if (ra != -1) {
@@ -590,7 +590,7 @@ htab_map_binary(device *me,
htaborg, htabmask);
/* dma the sections into physical memory */
- bfd_map_over_sections (image, htab_dma_binary, (PTR) &sizes);
+ bfd_map_over_sections (image, htab_dma_binary, &sizes);
}
static void
diff --git a/sim/ppc/hw_init.c b/sim/ppc/hw_init.c
index 66f2058..804daa9 100644
--- a/sim/ppc/hw_init.c
+++ b/sim/ppc/hw_init.c
@@ -316,7 +316,7 @@ static device_callbacks const hw_data_callbacks = {
static void
update_for_binary_section(bfd *abfd,
asection *the_section,
- PTR obj)
+ void *obj)
{
unsigned_word section_vma;
unsigned_word section_size;
@@ -431,7 +431,7 @@ hw_binary_init_data_callback(device *me)
/* and the data sections */
bfd_map_over_sections(image,
update_for_binary_section,
- (PTR)me);
+ me);
bfd_close(image);
}