X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c2f951e38bdf2b8639bf42b78b69c1530510b6f0..2558c8c0eb206ff353cb88672f5a90cd0e2562d3:/src/mc/mc_unw_vmread.cpp diff --git a/src/mc/mc_unw_vmread.cpp b/src/mc/mc_unw_vmread.cpp index 97b56468a8..1e7674cc86 100644 --- a/src/mc/mc_unw_vmread.cpp +++ b/src/mc/mc_unw_vmread.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017. The SimGrid Team. +/* Copyright (c) 2015-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -11,7 +11,7 @@ #include #include -#include "src/mc/mc_unw.h" +#include "src/mc/mc_unw.hpp" #include "src/mc/remote/RemoteClient.hpp" /** \file @@ -36,7 +36,7 @@ struct _UPT_info { static inline pid_t _UPT_getpid(void* arg) { - struct _UPT_info* info = static_cast<_UPT_info*>(arg); + _UPT_info* info = static_cast<_UPT_info*>(arg); return info->pid; } @@ -78,16 +78,16 @@ static int access_mem(const unw_addr_space_t as, if (fd < 0) return - UNW_EINVAL; while (1) { - ssize_t s = pread(fd, buf, count, off); - if (s == 0) { + ssize_t nread = pread(fd, buf, count, off); + if (nread == 0) { close(fd); return - UNW_EINVAL; } - if (s == -1) + if (nread == -1) break; - count -= s; - buf += s; - off += s; + count -= nread; + buf += nread; + off += nread; if (count == 0) { close(fd); return 0; @@ -132,7 +132,7 @@ unw_addr_space_t create_addr_space() return unw_create_addr_space(&accessors, BYTE_ORDER); } -void* create_context(unw_addr_space_t as, pid_t pid) +void* create_context(unw_addr_space_t /*as*/, pid_t pid) { return _UPT_create(pid); }