Fix various build warnings.

This commit is contained in:
Ms2ger 2015-03-20 14:30:30 +01:00
parent 717805a593
commit 1604515fd9
16 changed files with 32 additions and 35 deletions

View file

@ -67,7 +67,7 @@ pub extern "C" fn command_line_get_switch_value(cmd: *mut cef_command_line_t, na
if o.as_slice().starts_with(opt.as_slice()) {
let mut string = mem::uninitialized();
let arg = o[opt.len() + 1..].as_bytes();
let c_str = ffi::CString::from_slice(arg);
let c_str = ffi::CString::new(arg).unwrap();
cef_string_utf16_set(c_str.as_bytes().as_ptr() as *const _,
arg.len() as size_t,
&mut string,

View file

@ -47,7 +47,7 @@ fn load_gl() {
gl::load_with(|s| {
unsafe {
let c_str = CString::from_slice(s.as_bytes());
let c_str = CString::new(s).unwrap();
dlsym(RTLD_DEFAULT, c_str.as_ptr()) as *const c_void
}
});
@ -61,7 +61,7 @@ fn load_gl() {
gl::load_with(|s| {
unsafe {
let c_str = CString::from_slice(s.as_bytes());
let c_str = CString::new(s).unwrap();
glXGetProcAddress(c_str.as_ptr()) as *const c_void
}
});