From: Arnaud Giersch Date: Tue, 26 Feb 2019 20:30:42 +0000 (+0100) Subject: Remove dead code after returrn statement. X-Git-Tag: v3_22~225 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c18fbaf6d573a7fcdf499c5b9554778c28a71520 Remove dead code after returrn statement. --- diff --git a/src/mc/compare.cpp b/src/mc/compare.cpp index cbff01c603..a209a61f5b 100644 --- a/src/mc/compare.cpp +++ b/src/mc/compare.cpp @@ -732,7 +732,6 @@ static int compare_heap_area_with_type( else return MC_snapshot_region_memcmp(real_area1, heap_region1, real_area2, heap_region2, type->byte_size) != 0; } - break; case DW_TAG_enumeration_type: if (area_size != -1 && type->byte_size != area_size) @@ -775,7 +774,6 @@ static int compare_heap_area_with_type( break; default: return 0; - break; } for (int i = 0; i < type->element_count; i++) { // TODO, add support for variable stride (DW_AT_byte_stride) @@ -1280,7 +1278,6 @@ static int compare_areas_with_type(simgrid::mc::StateComparator& state, break; default: return 0; - break; } for (i = 0; i < type->element_count; i++) { size_t off = i * elm_size; @@ -1335,7 +1332,6 @@ static int compare_areas_with_type(simgrid::mc::StateComparator& state, return (addr_pointed1 != addr_pointed2); } - break; } case DW_TAG_structure_type: case DW_TAG_class_type: @@ -1352,7 +1348,6 @@ static int compare_areas_with_type(simgrid::mc::StateComparator& state, break; case DW_TAG_subroutine_type: return -1; - break; default: XBT_VERB("Unknown case: %d", type->type); break; diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index c770e2ca8d..8f0fc8890b 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -146,7 +146,7 @@ Comm* Comm::wait_for(double timeout) { switch (state_) { case State::FINISHED: - return this; + break; case State::INITED: // It's not started yet. Do it in one simcall if (src_buff_ != nullptr) { @@ -160,13 +160,13 @@ Comm* Comm::wait_for(double timeout) user_data_, timeout, rate_); } state_ = State::FINISHED; - return this; + break; case State::STARTED: simcall_comm_wait(pimpl_, timeout); on_completion(Actor::self()); state_ = State::FINISHED; - return this; + break; case State::CANCELED: throw CancelException(XBT_THROW_POINT, "Communication canceled"); diff --git a/src/simdag/sd_task.cpp b/src/simdag/sd_task.cpp index 9cd35936cd..86a8e15fe4 100644 --- a/src/simdag/sd_task.cpp +++ b/src/simdag/sd_task.cpp @@ -593,7 +593,6 @@ int SD_task_dependency_exists(SD_task_t src, SD_task_t dst) } else { return dst->predecessors->size() + dst->inputs->size(); } - return 0; } /** diff --git a/src/xbt/exception.cpp b/src/xbt/exception.cpp index 94fc91f197..eb4878a134 100644 --- a/src/xbt/exception.cpp +++ b/src/xbt/exception.cpp @@ -65,7 +65,6 @@ const char* xbt_ex_catname(xbt_errcat_t cat) default: return "INVALID ERROR"; } - return "INVALID ERROR"; } namespace simgrid {