Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : remove unused variable with debug mode disabled
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Fri, 5 Oct 2012 11:27:35 +0000 (13:27 +0200)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Fri, 5 Oct 2012 17:19:15 +0000 (19:19 +0200)
src/mc/test/compare_snapshot.c

index d8ad53b..5a3fdfe 100644 (file)
@@ -21,8 +21,7 @@ static void test1()
   mc_snapshot_t snapshot2 = xbt_new0(s_mc_snapshot_t, 1);
   MC_take_snapshot_liveness(snapshot2);
 
-  int res = snapshot_compare(snapshot1, snapshot2);
-  xbt_assert(res == 0);
+  xbt_assert(snapshot_compare(snapshot1, snapshot2) == 0);
 
   MC_UNSET_RAW_MEM;
 
@@ -58,8 +57,7 @@ static void test2()
   mc_snapshot_t snapshot2 = xbt_new0(s_mc_snapshot_t, 1);
   MC_take_snapshot_liveness(snapshot2);
 
-  int res = snapshot_compare(snapshot1, snapshot2);
-  xbt_assert(res != 0);
+  xbt_assert(snapshot_compare(snapshot1, snapshot2) != 0);
 
   MC_UNSET_RAW_MEM;
   
@@ -98,8 +96,7 @@ static void test3()
   mc_snapshot_t snapshot2 = xbt_new0(s_mc_snapshot_t, 1);
   MC_take_snapshot_liveness(snapshot2);
 
-  int res = snapshot_compare(snapshot1, snapshot2);
-  xbt_assert(res == 0);
+  xbt_assert(snapshot_compare(snapshot1, snapshot2) == 0);
   
   MC_UNSET_RAW_MEM;
   
@@ -137,8 +134,7 @@ static void test4()
   mc_snapshot_t snapshot2 = xbt_new0(s_mc_snapshot_t, 1);
   MC_take_snapshot_liveness(snapshot2);
 
-  int res = snapshot_compare(snapshot1, snapshot2);
-  xbt_assert(res != 0);
+  xbt_assert(snapshot_compare(snapshot1, snapshot2) != 0);
   
   MC_UNSET_RAW_MEM;
   
@@ -176,8 +172,7 @@ static void test5()
   mc_snapshot_t snapshot2 = xbt_new0(s_mc_snapshot_t, 1);
   MC_take_snapshot_liveness(snapshot2);
 
-  int res = snapshot_compare(snapshot1, snapshot2);
-  xbt_assert(res != 0);
+  xbt_assert(snapshot_compare(snapshot1, snapshot2) != 0);
   
   MC_UNSET_RAW_MEM;
   
@@ -215,8 +210,7 @@ static void test6()
   mc_snapshot_t snapshot2 = xbt_new0(s_mc_snapshot_t, 1);
   MC_take_snapshot_liveness(snapshot2);
 
-  int res = snapshot_compare(snapshot1, snapshot2);
-  xbt_assert(res == 0);
+  xbt_assert(snapshot_compare(snapshot1, snapshot2) == 0);
   
   MC_UNSET_RAW_MEM;