mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix all Windows warnings
This commit is contained in:
parent
9c6e6cb8d8
commit
8eb363528b
3 changed files with 14 additions and 4 deletions
|
@ -356,10 +356,14 @@ impl ReportsForest {
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
mod system_reporter {
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
use libc::{c_char, c_int, c_void, size_t};
|
||||
use profile_traits::mem::{Report, ReportKind, ReporterRequest};
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
use std::ffi::CString;
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
use std::mem::size_of;
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
use std::ptr::null_mut;
|
||||
use super::{JEMALLOC_HEAP_ALLOCATED_STR, SYSTEM_HEAP_ALLOCATED_STR};
|
||||
#[cfg(target_os = "macos")]
|
||||
|
@ -456,6 +460,7 @@ mod system_reporter {
|
|||
None
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
extern {
|
||||
#[cfg_attr(any(target_os = "macos", target_os = "android"), link_name = "je_mallctl")]
|
||||
fn mallctl(name: *const c_char, oldp: *mut c_void, oldlenp: *mut size_t,
|
||||
|
@ -499,7 +504,7 @@ mod system_reporter {
|
|||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
fn jemalloc_stat(value_name: &str) -> Option<usize> {
|
||||
fn jemalloc_stat(_value_name: &str) -> Option<usize> {
|
||||
None
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue