From: Arnaud Giersch Date: Sat, 28 Oct 2017 15:49:33 +0000 (+0200) Subject: Sonar: remove redundant jumps. X-Git-Tag: v3.18~365 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/21a31de1d846c96e4556956d9426cbd27c24b559 Sonar: remove redundant jumps. --- diff --git a/src/mc/mc_checkpoint.cpp b/src/mc/mc_checkpoint.cpp index aa9f21d46f..6538130f8a 100644 --- a/src/mc/mc_checkpoint.cpp +++ b/src/mc/mc_checkpoint.cpp @@ -143,7 +143,6 @@ void add_region(int index, simgrid::mc::Snapshot* snapshot, snapshot->snapshot_regions[index] = std::unique_ptr( new simgrid::mc::RegionSnapshot(std::move(region))); - return; } static void get_memory_regions(simgrid::mc::RemoteClient* process, simgrid::mc::Snapshot* snapshot) diff --git a/src/mc/mc_dwarf.cpp b/src/mc/mc_dwarf.cpp index 5e95580971..e7ae5708ce 100644 --- a/src/mc/mc_dwarf.cpp +++ b/src/mc/mc_dwarf.cpp @@ -831,7 +831,7 @@ static void MC_dwarf_handle_variable_die(simgrid::mc::ObjectInformation* info, D if (not variable) return; // Those arrays are sorted later: - else if (variable->global) + if (variable->global) info->global_variables.push_back(std::move(*variable)); else if (frame != nullptr) frame->variables.push_back(std::move(*variable)); diff --git a/src/mc/remote/Channel.cpp b/src/mc/remote/Channel.cpp index 1fee675094..b655b6160b 100644 --- a/src/mc/remote/Channel.cpp +++ b/src/mc/remote/Channel.cpp @@ -29,11 +29,10 @@ Channel::~Channel() int Channel::send(const void* message, size_t size) const { XBT_DEBUG("Send %s", MC_message_type_name(*(e_mc_message_type*)message)); - while (::send(this->socket_, message, size, 0) == -1) - if (errno == EINTR) - continue; - else + while (::send(this->socket_, message, size, 0) == -1) { + if (errno != EINTR) return errno; + } return 0; } diff --git a/src/mc/remote/RemoteClient.cpp b/src/mc/remote/RemoteClient.cpp index 4f87d9a192..c637009856 100644 --- a/src/mc/remote/RemoteClient.cpp +++ b/src/mc/remote/RemoteClient.cpp @@ -649,7 +649,6 @@ void RemoteClient::dumpStack() _UPT_destroy(context); unw_destroy_addr_space(as); - return; } bool RemoteClient::actor_is_enabled(aid_t pid)