changeset 3250:283b2c38b413

Fix compiler warnings. [ Bugzilla 1001865 ]
author vae
date Sat, 15 Jun 2013 20:25:20 +0000
parents 6e9f1cd4ed38
children a27026771dae
files packages/kernel/current/ChangeLog packages/kernel/current/tests/kcache1.c packages/kernel/current/tests/kintr0.c
diffstat 3 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/packages/kernel/current/ChangeLog
+++ b/packages/kernel/current/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-13  Ilija Kocho  <ilijak@siva.com.mk>
+
+	* tests/kintr0.c, tests/kcache1.c: Fix compiler warnings.
+
 2013-04-26  Ilija Kocho  <ilijak@siva.com.mk>
 
 	* tests/fpint_thread_switch.c: Fix missing semicolon.
--- a/packages/kernel/current/tests/kcache1.c
+++ b/packages/kernel/current/tests/kcache1.c
@@ -109,7 +109,7 @@ static void time0(register cyg_uint32 st
     register cyg_uint32 j,k;
     cyg_tick_count_t count0, count1;
     cyg_ucount32 t;
-    register char c;
+    register char c CYGBLD_ATTRIB_UNUSED;
 
     count0 = cyg_current_time();
 
@@ -147,7 +147,7 @@ static void time0II(register cyg_uint32 
     register cyg_uint32 j,k;
     cyg_tick_count_t count0, count1;
     cyg_ucount32 t;
-    register char c;
+    register char c CYGBLD_ATTRIB_UNUSED;
 
     count0 = cyg_current_time();
 
@@ -189,7 +189,7 @@ static void time0DI(register cyg_uint32 
     volatile cyg_tick_count_t count0;
     cyg_tick_count_t count1;
     cyg_ucount32 t;
-    register char c;
+    register char c CYGBLD_ATTRIB_UNUSED;
     register CYG_INTERRUPT_STATE oldints;
 
     count0 = cyg_current_time();
--- a/packages/kernel/current/tests/kintr0.c
+++ b/packages/kernel/current/tests/kintr0.c
@@ -142,10 +142,12 @@ static bool flash( void )
 
 static cyg_VSR_t vsr0;
 
-static void vsr0()
+static void vsr0(void)
 {
 }
 
+static void (*vsr0_p)(void) = vsr0;
+
 void kintr0_main( void )
 {
     cyg_vector_t v = (CYGNUM_HAL_VSR_MIN + 11) % CYGNUM_HAL_VSR_COUNT;
@@ -221,7 +223,7 @@ void kintr0_main( void )
     cyg_interrupt_get_vsr( v, &new_vsr );
     CHECK( old_vsr == new_vsr );
         
-    CHECK( NULL != vsr0 );
+    CHECK( NULL != *vsr0_p );
 
     cyg_interrupt_mask(v1);
     cyg_interrupt_unmask(v1);