Fix build warnings in the cef port.

This commit is contained in:
Ms2ger 2014-10-23 16:32:54 +02:00
parent 3c97438bdc
commit 95befc2ab2
2 changed files with 4 additions and 5 deletions

View file

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use azure;
use command_line::command_line_init; use command_line::command_line_init;
use eutil::fptr_is_null; use eutil::fptr_is_null;
use geom::size::TypedSize2D; use geom::size::TypedSize2D;
@ -49,7 +48,7 @@ pub extern "C" fn cef_shutdown() {
pub extern "C" fn cef_run_message_loop() { pub extern "C" fn cef_run_message_loop() {
let mut urls = Vec::new(); let mut urls = Vec::new();
urls.push("http://s27.postimg.org/vqbtrolyr/servo.jpg".to_string()); urls.push("http://s27.postimg.org/vqbtrolyr/servo.jpg".to_string());
let opts = opts::Opts { opts::set_opts(opts::Opts {
urls: urls, urls: urls,
n_render_threads: 1, n_render_threads: 1,
gpu_painting: false, gpu_painting: false,
@ -75,7 +74,7 @@ pub extern "C" fn cef_run_message_loop() {
user_agent: None, user_agent: None,
dump_flow_tree: false, dump_flow_tree: false,
validate_display_list_geometry: false, validate_display_list_geometry: false,
}; });
native::start(0, 0 as *const *const u8, proc() { native::start(0, 0 as *const *const u8, proc() {
let window = Some(glfw_app::create_window()); let window = Some(glfw_app::create_window());
servo::run(window); servo::run(window);

View file

@ -49,8 +49,8 @@ pub extern "C" fn cef_string_list_value(lt: *mut cef_string_list_t, index: c_int
if index < 0 || fptr_is_null(mem::transmute(lt)) { return 0; } if index < 0 || fptr_is_null(mem::transmute(lt)) { return 0; }
let v = string_map_to_vec(lt); let v = string_map_to_vec(lt);
if index as uint > (*v).len() - 1 { return 0; } if index as uint > (*v).len() - 1 { return 0; }
let cs = (*v).get(index as uint); let cs = (*v)[index as uint];
cef_string_utf8_set(mem::transmute((**cs).str), (**cs).length, value, 1) cef_string_utf8_set(mem::transmute((*cs).str), (*cs).length, value, 1)
} }
} }