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/. */
use azure;
use command_line::command_line_init;
use eutil::fptr_is_null;
use geom::size::TypedSize2D;
@ -49,7 +48,7 @@ pub extern "C" fn cef_shutdown() {
pub extern "C" fn cef_run_message_loop() {
let mut urls = Vec::new();
urls.push("http://s27.postimg.org/vqbtrolyr/servo.jpg".to_string());
let opts = opts::Opts {
opts::set_opts(opts::Opts {
urls: urls,
n_render_threads: 1,
gpu_painting: false,
@ -75,7 +74,7 @@ pub extern "C" fn cef_run_message_loop() {
user_agent: None,
dump_flow_tree: false,
validate_display_list_geometry: false,
};
});
native::start(0, 0 as *const *const u8, proc() {
let window = Some(glfw_app::create_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; }
let v = string_map_to_vec(lt);
if index as uint > (*v).len() - 1 { return 0; }
let cs = (*v).get(index as uint);
cef_string_utf8_set(mem::transmute((**cs).str), (**cs).length, value, 1)
let cs = (*v)[index as uint];
cef_string_utf8_set(mem::transmute((*cs).str), (*cs).length, value, 1)
}
}