Skip to content
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

Merged
merged 5 commits into from
Feb 8, 2015

Conversation

mindw
Copy link
Contributor

@mindw mindw commented Feb 6, 2015

also silence most compilation warnings

@mindw mindw force-pushed the fix_win32_failures branch from 838a611 to 3dc838f Compare February 6, 2015 12:22
@giampaolo
Copy link
Owner

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:

psutil/arch/windows/process_handles.c(191) : warning C4022: 'DuplicateHandle' : pointer mismatch for actual parameter 2

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)) ) {
Copy link
Owner

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))) 
{

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@mindw mindw force-pushed the fix_win32_failures branch from 3dc838f to 25f87a8 Compare February 7, 2015 21:53
@mindw mindw force-pushed the fix_win32_failures branch from bbcc7bd to 2f7a403 Compare February 7, 2015 22:03
@mindw
Copy link
Contributor Author

mindw commented Feb 7, 2015

Fixed open_files for PID>=64K.
Fix a new issue with ipaddress+enum+py27

@giampaolo
Copy link
Owner

Cool! What's PrintError? I see you defined it but apparently you never use it.

giampaolo added a commit that referenced this pull request Feb 8, 2015
fix most warnings and test failures on win32
@giampaolo giampaolo merged commit b91d2f0 into giampaolo:master Feb 8, 2015
@mindw
Copy link
Contributor Author

mindw commented Feb 8, 2015

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 ...

@mindw mindw deleted the fix_win32_failures branch February 8, 2015 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants