[rtems commit] genmcf548x/irq/irq.c: Fix incompatible pointer warning

Joel Sherrill joel at rtems.org
Mon Apr 24 22:21:55 UTC 2017


Module:    rtems
Branch:    master
Commit:    485222e633da85047daa1dafd1732b2b4750e933
Changeset: http://git.rtems.org/rtems/commit/?id=485222e633da85047daa1dafd1732b2b4750e933

Author:    Joel Sherrill <joel at rtems.org>
Date:      Mon Apr 24 12:00:15 2017 -0500

genmcf548x/irq/irq.c: Fix incompatible pointer warning

---

 c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c b/c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c
index 47a155a..58e9044 100644
--- a/c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c
+++ b/c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c
@@ -99,18 +99,24 @@ rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
 
 static void_func get_exception_handler(rtems_vector_number vector)
 {
+  void **vbr;
   void_func *exception_table;
 
-  m68k_get_vbr(exception_table);
+  m68k_get_vbr(vbr);
+
+  exception_table = (void_func *)vbr;
 
   return exception_table[vector_to_exception_vector(vector)];
 }
 
 static void set_exception_handler(rtems_vector_number vector, void_func handler)
 {
+  void **vbr;
   void_func *exception_table;
 
-  m68k_get_vbr(exception_table);
+  m68k_get_vbr(vbr);
+
+  exception_table = (void_func *)vbr;
 
   exception_table[vector_to_exception_vector(vector)] = handler;
 }



More information about the vc mailing list