diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-28 06:07:36 -0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-28 06:07:36 -0800 |
commit | 5964d6c2fc2a879ad1506085c9631ee0b1cd1fa5 (patch) | |
tree | 19c2d204cbfb3d8314d55fa701fd1178211c527e /psutil | |
parent | 59e3c5e2aa889d443f5f0e44beb52f654fc6e23e (diff) | |
download | psutil-5964d6c2fc2a879ad1506085c9631ee0b1cd1fa5.tar.gz |
fix compilation warnings
Diffstat (limited to 'psutil')
-rw-r--r-- | psutil/_psutil_windows.c | 4 | ||||
-rw-r--r-- | psutil/arch/windows/ntextapi.h | 4 | ||||
-rw-r--r-- | psutil/arch/windows/process_handles.c | 6 |
3 files changed, 5 insertions, 9 deletions
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index e9db62a5..343f8878 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -2747,11 +2747,7 @@ static char *get_region_protection_string(ULONG protection) { */ static PyObject * psutil_proc_memory_maps(PyObject *self, PyObject *args) { -#ifdef _WIN64 - MEMORY_BASIC_INFORMATION64 basicInfo; -#else MEMORY_BASIC_INFORMATION basicInfo; -#endif DWORD pid; HANDLE hProcess = NULL; PVOID baseAddress; diff --git a/psutil/arch/windows/ntextapi.h b/psutil/arch/windows/ntextapi.h index 8007ec01..4a351b41 100644 --- a/psutil/arch/windows/ntextapi.h +++ b/psutil/arch/windows/ntextapi.h @@ -227,8 +227,8 @@ typedef enum _KWAIT_REASON { typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX { PVOID Object; - HANDLE UniqueProcessId; - HANDLE HandleValue; + ULONG_PTR UniqueProcessId; + ULONG_PTR HandleValue; ULONG GrantedAccess; USHORT CreatorBackTraceIndex; USHORT ObjectTypeIndex; diff --git a/psutil/arch/windows/process_handles.c b/psutil/arch/windows/process_handles.c index 6f133ef9..b639d381 100644 --- a/psutil/arch/windows/process_handles.c +++ b/psutil/arch/windows/process_handles.c @@ -169,11 +169,11 @@ psutil_get_open_files_ntqueryobject(long dwPid, HANDLE hProcess) { hHandle = &pHandleInfo->Handles[i]; // Check if this hHandle belongs to the PID the user specified. - if (hHandle->UniqueProcessId != (HANDLE)dwPid) + if (hHandle->UniqueProcessId != (ULONG_PTR)dwPid) goto loop_cleanup; if (!DuplicateHandle(hProcess, - hHandle->HandleValue, + (HANDLE)hHandle->HandleValue, GetCurrentProcess(), &g_hFile, 0, @@ -365,7 +365,7 @@ psutil_get_open_files_getmappedfilename(long dwPid, HANDLE hProcess) { hHandle = &pHandleInfo->Handles[i]; // Check if this hHandle belongs to the PID the user specified. - if (hHandle->UniqueProcessId != (HANDLE)dwPid) + if (hHandle->UniqueProcessId != (ULONG_PTR)dwPid) goto loop_cleanup; if (!DuplicateHandle(hProcess, |