summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-02-19 08:41:16 -0800
committerGiampaolo Rodola <g.rodola@gmail.com>2019-02-19 08:41:16 -0800
commitf4047035a45f01de2fab774d6b645c7e544c5224 (patch)
tree74d244a1c372a5fa5d2ab567c70d36f4b18c25e4
parent7381d4d15dd7fe108e1bf350c3f76035922c6ed4 (diff)
downloadpsutil-f4047035a45f01de2fab774d6b645c7e544c5224.tar.gz
fix compilation warnings on win
-rw-r--r--psutil/_psutil_windows.c3
-rw-r--r--psutil/arch/windows/process_info.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c
index b5b5a8f5..e875b742 100644
--- a/psutil/_psutil_windows.c
+++ b/psutil/_psutil_windows.c
@@ -765,7 +765,7 @@ psutil_proc_exe(PyObject *self, PyObject *args) {
HANDLE hProcess;
wchar_t exe[MAX_PATH];
#if (_WIN32_WINNT >= 0x0600) // >= Vista
- PDWORD size = MAX_PATH;
+ unsigned int size = sizeof(exe);
#endif
if (! PyArg_ParseTuple(args, "l", &pid))
@@ -3100,7 +3100,6 @@ psutil_proc_memory_maps(PyObject *self, PyObject *args) {
GetSystemInfo(&system_info);
maxAddr = system_info.lpMaximumApplicationAddress;
baseAddress = NULL;
- previousAllocationBase = NULL;
while (VirtualQueryEx(hProcess, baseAddress, &basicInfo,
sizeof(MEMORY_BASIC_INFORMATION)))
diff --git a/psutil/arch/windows/process_info.h b/psutil/arch/windows/process_info.h
index f85c1efd..b8e9e28b 100644
--- a/psutil/arch/windows/process_info.h
+++ b/psutil/arch/windows/process_info.h
@@ -26,7 +26,7 @@ int psutil_assert_pid_exists(DWORD pid, char *err);
int psutil_assert_pid_not_exists(DWORD pid, char *err);
-PyObject* psutil_get_cmdline(long pid);
+PyObject* psutil_get_cmdline(long pid, int use_peb);
PyObject* psutil_get_cwd(long pid);
PyObject* psutil_get_environ(long pid);