-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix most warnings and test failures on win32 #579
Conversation
838a611
to
3dc838f
Compare
This is truly awesome, thanks! I've been wanting to fix these warnings for a long time but never managed to get around them. There's still one last warning popping up:
Do you think you can do anything about that? |
@@ -601,7 +601,7 @@ psutil_proc_memory_info(PyObject *self, PyObject *args) | |||
return NULL; | |||
} | |||
|
|||
if (! GetProcessMemoryInfo(hProcess, &cnt, sizeof(cnt)) ) { | |||
if (! GetProcessMemoryInfo(hProcess, (PPROCESS_MEMORY_COUNTERS)&cnt, sizeof(cnt)) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line len exceeds 80 chars. Something like this should work:
if (! GetProcessMemoryInfo(hProcess, (PPROCESS_MEMORY_COUNTERS)&cnt,
sizeof(cnt)))
{
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
3dc838f
to
25f87a8
Compare
bbcc7bd
to
2f7a403
Compare
Fixed open_files for PID>=64K. |
Cool! What's PrintError? I see you defined it but apparently you never use it. |
fix most warnings and test failures on win32
PrintError = ExtremlyComplexAndScaryMsStyle( strerror); It should replace GetError() calls in the commented out debug prints. Please note that TestDualProcessImplementation::proc_io_counters still fails for me. I'll try and solve this sometime in the future ... |
also silence most compilation warnings