mirror of
https://github.com/servo/servo.git
synced 2025-07-14 19:03:40 +01:00
Deny unused variables.
This commit is contained in:
parent
bfde6ac0a7
commit
33a7fe4f7e
5 changed files with 26 additions and 16 deletions
|
@ -30,7 +30,7 @@ B := $(CFG_BUILD_DIR)
|
||||||
MKFILE_DEPS := $(CFG_BUILD_HOME)config.stamp $(call rwildcard,$(S)mk/,*)
|
MKFILE_DEPS := $(CFG_BUILD_HOME)config.stamp $(call rwildcard,$(S)mk/,*)
|
||||||
|
|
||||||
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
|
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
|
||||||
CFG_RUSTC_FLAGS += -D unused-imports
|
CFG_RUSTC_FLAGS += -D unused-imports -D unused-variable
|
||||||
|
|
||||||
ifdef CFG_DISABLE_OPTIMIZE
|
ifdef CFG_DISABLE_OPTIMIZE
|
||||||
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
|
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
|
||||||
|
|
|
@ -8,20 +8,22 @@ use std::mem;
|
||||||
use types::{cef_browser_settings_t, cef_browser_t, cef_client_t, cef_request_context_t, cef_string_t, cef_window_info_t};
|
use types::{cef_browser_settings_t, cef_browser_t, cef_client_t, cef_request_context_t, cef_string_t, cef_window_info_t};
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_browser_host_create_browser(windowInfo: *cef_window_info_t,
|
pub extern "C" fn cef_browser_host_create_browser(_windowInfo: *cef_window_info_t,
|
||||||
client: *mut cef_client_t,
|
_client: *mut cef_client_t,
|
||||||
url: *cef_string_t,
|
_url: *cef_string_t,
|
||||||
settings: *cef_browser_settings_t,
|
_settings: *cef_browser_settings_t,
|
||||||
request_context: *mut cef_request_context_t) -> c_int {
|
_request_context: *mut cef_request_context_t)
|
||||||
|
-> c_int {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_browser_host_create_browser_sync(windowInfo: *cef_window_info_t,
|
pub extern "C" fn cef_browser_host_create_browser_sync(_windowInfo: *cef_window_info_t,
|
||||||
client: *mut cef_client_t,
|
_client: *mut cef_client_t,
|
||||||
url: *cef_string_t,
|
_url: *cef_string_t,
|
||||||
settings: *cef_browser_settings_t,
|
_settings: *cef_browser_settings_t,
|
||||||
request_context: *mut cef_request_context_t) -> *mut cef_browser_t {
|
_request_context: *mut cef_request_context_t)
|
||||||
|
-> *mut cef_browser_t {
|
||||||
unsafe {
|
unsafe {
|
||||||
let browser = calloc(1, mem::size_of::<cef_browser_t>() as size_t) as *mut cef_browser_t;
|
let browser = calloc(1, mem::size_of::<cef_browser_t>() as size_t) as *mut cef_browser_t;
|
||||||
browser
|
browser
|
||||||
|
|
|
@ -15,8 +15,11 @@ use types::{cef_app_t, cef_main_args_t, cef_settings_t};
|
||||||
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_initialize(args: *cef_main_args_t, settings: *mut cef_settings_t,
|
pub extern "C" fn cef_initialize(args: *cef_main_args_t,
|
||||||
application: *mut cef_app_t, windows_sandbox_info: *c_void) -> c_int {
|
_settings: *mut cef_settings_t,
|
||||||
|
application: *mut cef_app_t,
|
||||||
|
_windows_sandbox_info: *c_void)
|
||||||
|
-> c_int {
|
||||||
if args.is_null() {
|
if args.is_null() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +74,9 @@ pub extern "C" fn cef_quit_message_loop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_execute_process(args: *cef_main_args_t, app: *mut cef_app_t, windows_sandbox_info: *mut c_void) -> c_int {
|
pub extern "C" fn cef_execute_process(_args: *cef_main_args_t,
|
||||||
|
_app: *mut cef_app_t,
|
||||||
|
_windows_sandbox_info: *mut c_void)
|
||||||
|
-> c_int {
|
||||||
-1
|
-1
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,6 @@ use types::cef_thread_id_t;
|
||||||
|
|
||||||
//FIXME: this should check the current servo task I guess?
|
//FIXME: this should check the current servo task I guess?
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_currently_on(tid: cef_thread_id_t) -> c_int {
|
pub extern "C" fn cef_currently_on(_tid: cef_thread_id_t) -> c_int {
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@ use types::{cef_request_t, cef_urlrequest_client_t, cef_urlrequest_t};
|
||||||
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn cef_urlrequest_create(request: *mut cef_request_t, client: *mut cef_urlrequest_client_t) -> *mut cef_urlrequest_t {
|
pub extern "C" fn cef_urlrequest_create(_request: *mut cef_request_t,
|
||||||
|
_client: *mut cef_urlrequest_client_t)
|
||||||
|
-> *mut cef_urlrequest_t {
|
||||||
0 as *mut cef_urlrequest_t
|
0 as *mut cef_urlrequest_t
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue