Bug 1532284 - Fix rustc compiler warnings when building wrench for Android. r=gw
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 07 Mar 2019 17:34:50 +0000
changeset 521018 3dc8bca5dd90
parent 521017 f63a07c8426b
child 521019 b958c752bbe6
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw
bugs1532284
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532284 - Fix rustc compiler warnings when building wrench for Android. r=gw Various variables are unused when building for Android. Differential Revision: https://phabricator.services.mozilla.com/D22376
gfx/wr/wrench/src/wrench.rs
--- a/gfx/wr/wrench/src/wrench.rs
+++ b/gfx/wr/wrench/src/wrench.rs
@@ -88,19 +88,19 @@ impl Notifier {
                     }
                 }
                 _ => {
                     println!("Notified of frame, but no frame was ready?");
                 }
             }
         }
 
-        if let Some(ref elp) = data.events_loop_proxy {
+        if let Some(ref _elp) = data.events_loop_proxy {
             #[cfg(not(target_os = "android"))]
-            let _ = elp.wakeup();
+            let _ = _elp.wakeup();
         }
     }
 }
 
 impl RenderNotifier for Notifier {
     fn clone(&self) -> Box<RenderNotifier> {
         Box::new(Notifier(self.0.clone()))
     }
@@ -222,19 +222,19 @@ impl Wrench {
             chase_primitive,
             enable_picture_caching: true,
             testing: true,
             max_texture_size: Some(8196), // Needed for rawtest::test_resize_image.
             ..Default::default()
         };
 
         // put an Awakened event into the queue to kick off the first frame
-        if let Some(ref elp) = proxy {
+        if let Some(ref _elp) = proxy {
             #[cfg(not(target_os = "android"))]
-            let _ = elp.wakeup();
+            let _ = _elp.wakeup();
         }
 
         let (timing_sender, timing_receiver) = chase_lev::deque();
         let notifier = notifier.unwrap_or_else(|| {
             let data = Arc::new(Mutex::new(NotifierData::new(proxy, timing_receiver, verbose)));
             Box::new(Notifier(data))
         });
 
@@ -445,17 +445,17 @@ impl Wrench {
             .build();
         let (font, index) = system_fonts::get(&property).unwrap();
         self.font_key_from_bytes(font, index as u32)
     }
 
     #[cfg(target_os = "android")]
     pub fn font_key_from_properties(
         &mut self,
-        family: &str,
+        _family: &str,
         _weight: u32,
         _style: u32,
         _stretch: u32,
     ) -> FontKey {
         unimplemented!()
     }
 
     #[cfg(all(unix, not(target_os = "android")))]
@@ -463,17 +463,17 @@ impl Wrench {
         let property = system_fonts::FontPropertyBuilder::new()
             .family(font_name)
             .build();
         let (font, index) = system_fonts::get(&property).unwrap();
         self.font_key_from_bytes(font, index as u32)
     }
 
     #[cfg(target_os = "android")]
-    pub fn font_key_from_name(&mut self, font_name: &str) -> FontKey {
+    pub fn font_key_from_name(&mut self, _font_name: &str) -> FontKey {
         unimplemented!()
     }
 
     pub fn font_key_from_bytes(&mut self, bytes: Vec<u8>, index: u32) -> FontKey {
         let key = self.api.generate_font_key();
         let mut txn = Transaction::new();
         txn.add_raw_font(key, bytes, index);
         self.api.update_resources(txn.resource_updates);