Browse Source

sim: bfin: fix build warnings w/newer gcc

The bfin_otp_write_page_val func wants a pointer to an bu64[2] array,
but this code passes it a pointer to a single bu64.  It's in a struct
with a known compatible layout:
	bu64 data0, data1, data2, data3;
But gcc doesn't allow these kinds of tricks anymore.  Use the more
verbose form to make the compiler happy since this is not performance
sensitive code.
binutils-2_37-branch
Mike Frysinger 5 years ago
parent
commit
3cc4ee83ad
  1. 4
      sim/bfin/ChangeLog
  2. 2
      sim/bfin/dv-bfin_otp.c

4
sim/bfin/ChangeLog

@ -1,3 +1,7 @@
2021-05-23 Mike Frysinger <vapier@gentoo.org>
* dv-bfin_otp.c (bfin_otp_write_page): Call bfin_otp_write_page_val2.
2021-05-23 Mike Frysinger <vapier@gentoo.org>
* dv-bfin_cec.c: Include strings.h.

2
sim/bfin/dv-bfin_otp.c

@ -91,7 +91,7 @@ bfin_otp_write_page_val2 (struct bfin_otp *otp, bu16 page, bu64 lo, bu64 hi)
static void
bfin_otp_write_page (struct bfin_otp *otp, bu16 page)
{
bfin_otp_write_page_val (otp, page, (void *)&otp->data0);
bfin_otp_write_page_val2 (otp, page, otp->data0, otp->data1);
}
static unsigned

Loading…
Cancel
Save