[PATCH 2/4] erc32/start/setvec.c: Fix warning

Joel Sherrill joel at rtems.org
Fri Mar 22 13:30:10 UTC 2019


---
 bsps/sparc/erc32/start/setvec.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/bsps/sparc/erc32/start/setvec.c b/bsps/sparc/erc32/start/setvec.c
index d3aa8ed..0200f42 100644
--- a/bsps/sparc/erc32/start/setvec.c
+++ b/bsps/sparc/erc32/start/setvec.c
@@ -40,10 +40,15 @@ rtems_isr_entry set_vector(                   /* returns old vector */
   uint32_t        real_trap;
   uint32_t        source;
 
-  if ( type )
+  if ( type ) {
     rtems_interrupt_catch( handler, vector, &previous_isr );
-  else
-    _CPU_ISR_install_raw_handler( vector, handler, (void *)&previous_isr );
+  } else {
+    _CPU_ISR_install_raw_handler(
+      vector,
+      (void *)handler,
+      (void *)&previous_isr
+    );
+  }
 
   real_trap = SPARC_REAL_TRAP_NUMBER( vector );
 
-- 
1.8.3.1




More information about the devel mailing list