Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Compile with flag NDEBUG.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 17 Feb 2011 14:00:39 +0000 (14:00 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 17 Feb 2011 14:00:39 +0000 (14:00 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9649 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/msg/icomms/peer2.c
examples/msg/icomms/peer3.c
examples/msg/parallel_task/test_ptask.c
src/simdag/sd_daxloader.c
src/simix/smx_context_sysv.c
src/surf/surf.c
src/surf/surf_routing.c

index 587deda..2db1409 100644 (file)
@@ -66,7 +66,8 @@ int receiver(int argc, char *argv[])
   int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
-  int read = sscanf(argv[1], "%d", &id);
+  int read;
+  read = sscanf(argv[1], "%d", &id);
   xbt_assert1(read, "Invalid argument %s\n", argv[1]);
   MSG_process_sleep(10);
   sprintf(mailbox, "receiver-%d", id);
index 417893d..6fcef1e 100644 (file)
@@ -88,7 +88,8 @@ int receiver(int argc, char *argv[])
   int tasks = atof(argv[2]);
   m_task_t *task = xbt_new(m_task_t, tasks);
 
-  int read = sscanf(argv[1], "%d", &id);
+  int read;
+  read = sscanf(argv[1], "%d", &id);
   xbt_assert1(read, "Invalid argument %s\n", argv[1]);
   sprintf(mailbox, "receiver-%d", id);
   MSG_process_sleep(10);
index 8047d8a..95b9c9f 100644 (file)
@@ -35,8 +35,8 @@ int execute(int argc, char *argv[])
   int host_list_size;
   double *computation_duration = NULL;
   double *communication_table = NULL;
-  double communication_amount;
-  double computation_amount;
+  double communication_amount = 0;
+  double computation_amount = 0;
   double execution_time;
 
 
@@ -91,7 +91,7 @@ int redistribute(int argc, char *argv[])
   int host_list_size;
   double *computation_duration = NULL;
   double *communication_table = NULL;
-  double communication_amount;
+  double communication_amount = 0;
   double redistribution_time;
 
 
index d06ec7a..c056626 100644 (file)
@@ -390,7 +390,8 @@ xbt_dynar_t SD_daxload(const char *filename)
 
 void STag_dax__adag(void)
 {
-  double version = dax_parse_double(A_dax__adag_version);
+  double version;
+  version = dax_parse_double(A_dax__adag_version);
 
   xbt_assert1((version == 2.1),
               "Expected version 2.1 in <adag> tag, got %f. Fix the parser or your file",
index 18cd39f..f7f59fd 100644 (file)
@@ -188,7 +188,8 @@ void smx_ctx_sysv_wrapper(int first, ...)
 void smx_ctx_sysv_suspend(smx_context_t context)
 {
   smx_current_context = (smx_context_t)maestro_context;
-  int rv = swapcontext(&((smx_ctx_sysv_t) context)->uc, &((smx_ctx_sysv_t)context)->old_uc);
+  int rv;
+  rv = swapcontext(&((smx_ctx_sysv_t) context)->uc, &((smx_ctx_sysv_t)context)->old_uc);
 
   xbt_assert0((rv == 0), "Context swapping failure");
 }
@@ -196,7 +197,8 @@ void smx_ctx_sysv_suspend(smx_context_t context)
 void smx_ctx_sysv_resume(smx_context_t context)
 {
   smx_current_context = context; 
-  int rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
+  int rv;
+  rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
 
   xbt_assert0((rv == 0), "Context swapping failure");
 }
@@ -217,7 +219,8 @@ void smx_ctx_sysv_resume_parallel(smx_process_t process)
 {
   smx_context_t context = process->context;
   smx_current_context = (smx_context_t)context;
-  int rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
+  int rv;
+  rv = swapcontext(&((smx_ctx_sysv_t)context)->old_uc, &((smx_ctx_sysv_t) context)->uc);
   smx_current_context = (smx_context_t)maestro_context;
 
   xbt_assert0((rv == 0), "Context swapping failure");
index 057a81e..edb6f37 100644 (file)
@@ -205,6 +205,7 @@ int find_model_description(s_surf_model_description_t * table,
   }
   xbt_assert2(0, "Model '%s' is invalid! Valid models are: %s.", name,
               name_list);
+  return -1;
 }
 
 double generic_maxmin_share_resources(xbt_swag_t running_actions,
index d91322f..5332cc6 100644 (file)
@@ -3267,7 +3267,7 @@ generic_processing_units_exist(routing_component_t rc, char *element)
 static void generic_src_dst_check(routing_component_t rc, const char *src,
                                   const char *dst)
 {
-
+ #ifndef NDEBUG
   routing_component_t src_as = ((network_element_info_t)
                                 xbt_dict_get_or_null
                                 (global_routing->where_network_elements,
@@ -3286,6 +3286,7 @@ static void generic_src_dst_check(routing_component_t rc, const char *src,
   xbt_assert2(rc == dst_as,
               "The routing component of src and dst is not the same as the network elements belong (%s==%s)",
               rc->name, dst_as->name);
+#endif
 }
 
 static void routing_parse_Sconfig(void)