mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
Fix some warnings in the CEF port.
This commit is contained in:
parent
445f1c891a
commit
b45cf4ccf8
5 changed files with 10 additions and 11 deletions
|
@ -34,9 +34,8 @@ pub fn command_line_init(argc: c_int, argv: *const *const u8) {
|
|||
unsafe {
|
||||
let mut a: Vec<String> = vec!();
|
||||
for i in 0u..(argc as uint) {
|
||||
let offset = *argv.offset(i as int) as *const c_char;
|
||||
let slice = ffi::c_str_to_bytes(&offset);
|
||||
let s = str::from_utf8(slice).unwrap();
|
||||
let slice = ffi::CStr::from_ptr(*argv.offset(i as int) as *const c_char);
|
||||
let s = str::from_utf8(slice.to_bytes()).unwrap();
|
||||
a.push(String::from_str(s));
|
||||
}
|
||||
let cl = command_line_new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue