servo: Merge #16598 - Fix various build warnings (from aacunningham:fix-build-errors); r=jdm

This removes six separate warnings when building servo. One of
the warnings was an unused mut, and the other were various dead code
warnings

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16584 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they address warnings from the build process

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: f3c1bbe0700806ef2def3b0c5ce0dde4eba107ea

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6f8c8212a51601e9dba5e8f8a345ba5ae89db147
This commit is contained in:
Aaron Cunningham 2017-04-25 01:02:56 -05:00
parent 29c680ad80
commit e36974081a
6 changed files with 6 additions and 0 deletions

View File

@ -1850,6 +1850,7 @@ class CGImports(CGWrapper):
'unused_imports',
'unused_variables',
'unused_assignments',
'unused_mut',
]
def componentTypes(type):

View File

@ -45,6 +45,7 @@ impl DissimilarOriginLocation {
DissimilarOriginLocationBinding::Wrap)
}
#[allow(dead_code)]
pub fn origin(&self) -> &MutableOrigin {
self.window.origin()
}

View File

@ -65,6 +65,7 @@ impl DissimilarOriginWindow {
unsafe { DissimilarOriginWindowBinding::Wrap(cx, win) }
}
#[allow(dead_code)]
pub fn origin(&self) -> &MutableOrigin {
self.globalscope.origin()
}

View File

@ -61,6 +61,7 @@ impl Location {
self.window.load_url(self.get_url(), true, true, None);
}
#[allow(dead_code)]
pub fn origin(&self) -> &MutableOrigin {
self.window.origin()
}

View File

@ -693,6 +693,7 @@ impl Window {
G_NESTED_EVENT_LOOP_LISTENER = None
}
#[cfg(target_os = "windows")]
fn char_to_script_key(c: char) -> Option<constellation_msg::Key> {
match c {
' ' => Some(Key::Space),

View File

@ -33,6 +33,7 @@ extern crate sig;
use backtrace::Backtrace;
use servo::Browser;
use servo::compositing::windowing::WindowEvent;
#[cfg(target_os = "android")]
use servo::config;
use servo::config::opts::{self, ArgumentParsingResult};
use servo::config::servo_version;