diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-10-17 16:34:00 -0700 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-10-17 16:34:00 -0700 |
commit | d4e8ae4013c8c0f389cc946abe780254db2512b9 (patch) | |
tree | 174679a7f6d589b692433d160c50907cdbed3d08 | |
parent | d0a81e6bd5bb963476b1b0eb32f9a7f3e6949d7f (diff) | |
download | psutil-d4e8ae4013c8c0f389cc946abe780254db2512b9.tar.gz |
osx: fix compiler warnings
-rw-r--r-- | psutil/_psutil_osx.c | 2 | ||||
-rw-r--r-- | psutil/arch/osx/process_info.c | 4 | ||||
-rw-r--r-- | psutil/arch/osx/process_info.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/psutil/_psutil_osx.c b/psutil/_psutil_osx.c index cf9eda6d..06b4ba25 100644 --- a/psutil/_psutil_osx.c +++ b/psutil/_psutil_osx.c @@ -1147,7 +1147,7 @@ error: static PyObject * psutil_proc_open_files(PyObject *self, PyObject *args) { long pid; - unsigned long pidinfo_result; + int pidinfo_result; int iterations; int i; unsigned long nb; diff --git a/psutil/arch/osx/process_info.c b/psutil/arch/osx/process_info.c index 9e6dc1ce..7b650c99 100644 --- a/psutil/arch/osx/process_info.c +++ b/psutil/arch/osx/process_info.c @@ -356,10 +356,10 @@ psutil_get_kinfo_proc(long pid, struct kinfo_proc *kp) { * A wrapper around proc_pidinfo(). * Returns 0 on failure (and Python exception gets already set). */ -unsigned long +int psutil_proc_pidinfo(long pid, int flavor, uint64_t arg, void *pti, int size) { errno = 0; - unsigned long ret = proc_pidinfo((int)pid, flavor, arg, pti, size); + int ret = proc_pidinfo((int)pid, flavor, arg, pti, size); if ((ret <= 0) || (ret < sizeof(pti))) { psutil_raise_for_pid(pid, "proc_pidinfo() syscall failed"); return 0; diff --git a/psutil/arch/osx/process_info.h b/psutil/arch/osx/process_info.h index 83fa1231..bd2eef86 100644 --- a/psutil/arch/osx/process_info.h +++ b/psutil/arch/osx/process_info.h @@ -11,7 +11,7 @@ typedef struct kinfo_proc kinfo_proc; int psutil_get_argmax(void); int psutil_get_kinfo_proc(long pid, struct kinfo_proc *kp); int psutil_get_proc_list(kinfo_proc **procList, size_t *procCount); -unsigned long psutil_proc_pidinfo( +int psutil_proc_pidinfo( long pid, int flavor, uint64_t arg, void *pti, int size); PyObject* psutil_get_cmdline(long pid); PyObject* psutil_get_environ(long pid); |