The process_id field is unsigned, so we need this cast in c++0x.

Patch by Rafael Ávila de Espí­ndola <respindola@mozilla.com>

https://bugzilla.mozilla.org/show_bug.cgi?id=677644


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@825 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mark@chromium.org 2011-08-11 13:47:38 +00:00
parent e6c0689091
commit 7b8b8632d3

View File

@ -1246,7 +1246,8 @@ bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) {
info_ptr->process_kernel_time =
static_cast<u_int32_t>(usage.ru_stime.tv_sec);
}
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, info_ptr->process_id };
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID,
static_cast<int>(info_ptr->process_id) };
u_int mibsize = static_cast<u_int>(sizeof(mib) / sizeof(mib[0]));
size_t size;
if (!sysctl(mib, mibsize, NULL, &size, NULL, 0)) {