From: navarrop Date: Thu, 17 Feb 2011 14:00:39 +0000 (+0000) Subject: Compile with flag NDEBUG. X-Git-Tag: v3.6_beta2~288 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5eecba1cd4850c7820f9cfa3c1af484f674b1e8b?hp=801093e4245e0d7e2ece7d02d373eb5ca7192776 Compile with flag NDEBUG. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9649 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/msg/icomms/peer2.c b/examples/msg/icomms/peer2.c index 587deda1d7..2db140910d 100644 --- a/examples/msg/icomms/peer2.c +++ b/examples/msg/icomms/peer2.c @@ -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); diff --git a/examples/msg/icomms/peer3.c b/examples/msg/icomms/peer3.c index 417893d0e7..6fcef1eae9 100644 --- a/examples/msg/icomms/peer3.c +++ b/examples/msg/icomms/peer3.c @@ -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); diff --git a/examples/msg/parallel_task/test_ptask.c b/examples/msg/parallel_task/test_ptask.c index 8047d8a444..95b9c9ff8d 100644 --- a/examples/msg/parallel_task/test_ptask.c +++ b/examples/msg/parallel_task/test_ptask.c @@ -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; diff --git a/src/simdag/sd_daxloader.c b/src/simdag/sd_daxloader.c index d06ec7a529..c056626357 100644 --- a/src/simdag/sd_daxloader.c +++ b/src/simdag/sd_daxloader.c @@ -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 tag, got %f. Fix the parser or your file", diff --git a/src/simix/smx_context_sysv.c b/src/simix/smx_context_sysv.c index 18cd39fad8..f7f59fd748 100644 --- a/src/simix/smx_context_sysv.c +++ b/src/simix/smx_context_sysv.c @@ -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"); diff --git a/src/surf/surf.c b/src/surf/surf.c index 057a81e407..edb6f37318 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -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, diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index d91322f9ac..5332cc62c5 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -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)