From 3cc4ee83adf2f6e2ab21e32f7d5942b1d1803a04 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 23 May 2021 21:35:32 -0400 Subject: 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. --- sim/bfin/ChangeLog | 4 ++++ sim/bfin/dv-bfin_otp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 1ebf681..9c517d2 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,5 +1,9 @@ 2021-05-23 Mike Frysinger + * dv-bfin_otp.c (bfin_otp_write_page): Call bfin_otp_write_page_val2. + +2021-05-23 Mike Frysinger + * dv-bfin_cec.c: Include strings.h. 2021-05-17 Mike Frysinger diff --git a/sim/bfin/dv-bfin_otp.c b/sim/bfin/dv-bfin_otp.c index 6cf1c81..65afdf5 100644 --- a/sim/bfin/dv-bfin_otp.c +++ b/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 -- cgit v1.1