servo: Merge #19612 - deny warnings (from tigercosmos:o1); r=jdm
authortigercosmos <phy.tiger@gmail.com>
Thu, 21 Dec 2017 13:57:04 -0600
changeset 397299 7696a00a06cd6eee03c1f9607a4fbabb431418c6
parent 397298 a71ff50707d45d37a2f7fac51f2c07f7df14f732
child 397300 aa7c634fd552e5023a52cab42e81255a5fa0383f
push id98500
push userapavel@mozilla.com
push dateFri, 22 Dec 2017 09:59:32 +0000
treeherdermozilla-inbound@e56c5099dbf6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
milestone59.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
servo: Merge #19612 - deny warnings (from tigercosmos:o1); r=jdm <!-- Please describe your changes on the following line: --> deny warnings related to #19573 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #19572 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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: 2eb1512c22e7d79a4c6af70af7aec53f4b18cac2
servo/.travis.yml
servo/appveyor.yml
servo/components/hashglobe/src/alloc.rs
servo/etc/ci/buildbot_steps.yml
servo/ports/glutin/lib.rs
--- a/servo/.travis.yml
+++ b/servo/.travis.yml
@@ -15,21 +15,21 @@ matrix:
       before_install:
         - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
         - sudo add-apt-repository 'deb http://apt.llvm.org/precise/ llvm-toolchain-precise-3.9 main' -y
         - sudo apt-get update -q
         - sudo apt-get install clang-3.9 llvm-3.9 llvm-3.9-runtime -y
         - export LLVM_CONFIG=/usr/lib/llvm-3.9/bin/llvm-config
         - export CC=gcc-5 CXX=g++-5
       script:
-         - ./mach build -d --verbose
-         - ./mach test-unit
+         - RUSTFLAGS='-D warnings' ./mach build -d --verbose
+         - RUSTFLAGS='-D warnings' ./mach test-unit
          - ./mach clean
-         - ./mach build-geckolib
-         - ./mach test-stylo
+         - RUSTFLAGS='-D warnings' ./mach build-geckolib
+         - RUSTFLAGS='-D warnings' ./mach test-stylo
          - bash etc/ci/lockfile_changed.sh
       cache:
         directories:
           - .cargo
           - .servo
           - $HOME/.ccache
       before_cache:
         - ./mach clean-nightlies --keep 2 --force
--- a/servo/appveyor.yml
+++ b/servo/appveyor.yml
@@ -43,11 +43,13 @@ cache:
 # Uncomment these lines to expose RDP access information to the build machine in the build log.
 #init:
 #  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
 #
 #on_finish:
 #  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
 
 build_script:
-  - mach build -d -v && mach test-unit
+  - set RUSTFLAGS=-D warnings
+  - mach build -d -v
+  - mach test-unit
 
 test: off
--- a/servo/components/hashglobe/src/alloc.rs
+++ b/servo/components/hashglobe/src/alloc.rs
@@ -23,16 +23,17 @@ const MIN_ALIGN: usize = 8;
 const MIN_ALIGN: usize = 16;
 
 pub use self::platform::{alloc, dealloc, realloc};
 
 #[cfg(any(unix, target_os = "redox"))]
 mod platform {
     extern crate libc;
 
+    #[cfg(not(any(target_os = "android")))]
     use std::ptr;
 
     use super::MIN_ALIGN;
 
     #[inline]
     pub unsafe fn alloc(size: usize, align: usize) -> *mut u8 {
         let ptr = if align <= MIN_ALIGN {
             libc::malloc(size) as *mut u8
--- a/servo/etc/ci/buildbot_steps.yml
+++ b/servo/etc/ci/buildbot_steps.yml
@@ -27,21 +27,21 @@ mac-rel-wpt4:
   - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
   - ./mach test-wpt --release --processes 4 --total-chunks 6 --this-chunk 4 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed
   - ./mach filter-intermittents wpt-errorsummary.log --log-intermittents intermittents.log --log-filteredsummary filtered-wpt-errorsummary.log --tracker-api default --reporter-api default
   - ./mach test-wpt --release --pref dom.servoparser.async_html_tokenizer.enabled --processes=8 --log-raw test-async-parsing.log --log-errorsummary async-parsing-errorsummary.log --always-succeed domparsing html/syntax html/dom/documents html/dom/dynamic-markup-insertion
   - ./mach filter-intermittents async-parsing-errorsummary.log --log-intermittents async-parsing-intermittents.log --log-filteredsummary filtered-async-parsing-errorsummary.log --tracker-api default --reporter-api default
 
 mac-dev-unit:
   - ./mach clean-nightlies --keep 3 --force
-  - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --dev
-  - env ./mach test-unit
+  - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig RUSTFLAGS=-Dwarnings ./mach build --dev
+  - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig RUSTFLAGS=-Dwarnings ./mach test-unit
   - env ./mach package --dev
-  - env ./mach build-cef
-  - ./mach build-geckolib
+  - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig RUSTFLAGS=-Dwarnings ./mach build-cef
+  - env RUSTFLAGS=-Dwarnings ./mach build-geckolib
   - bash ./etc/ci/lockfile_changed.sh
   - bash ./etc/ci/manifest_changed.sh
 
 mac-rel-css1:
   - ./mach clean-nightlies --keep 3 --force
   - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
   - ./mach test-wpt --release --processes 4 --total-chunks 6 --this-chunk 5 --log-raw test-wpt.log --log-errorsummary wpt-errorsummary.log --always-succeed
   - ./mach filter-intermittents wpt-errorsummary.log --log-intermittents intermittents.log --log-filteredsummary filtered-wpt-errorsummary.log --tracker-api default --reporter-api default
@@ -75,23 +75,23 @@ mac-rel-intermittent:
   - ./mach clean-nightlies --keep 3 --force
   - env PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig ./mach build --release
   - ./etc/ci/check_intermittents.sh --log-raw intermittents.log
 
 linux-dev:
   - ./mach clean-nightlies --keep 3 --force
   - ./mach test-tidy --no-progress --all
   - ./mach test-tidy --no-progress --self-test
-  - env CC=gcc-5 CXX=g++-5 ./mach build --dev
-  - env ./mach test-unit
+  - env CC=gcc-5 CXX=g++-5 RUSTFLAGS=-Dwarnings ./mach build --dev
+  - env CC=gcc-5 CXX=g++-5 RUSTFLAGS=-Dwarnings ./mach test-unit
   - env ./mach package --dev
-  - env ./mach build-cef
-  - env ./mach build --dev --no-default-features --features default-except-unstable
-  - ./mach build-geckolib
-  - ./mach test-stylo
+  - env CC=gcc-5 CXX=g++-5 RUSTFLAGS=-Dwarnings ./mach build-cef
+  - env CC=gcc-5 CXX=g++-5 RUSTFLAGS=-Dwarnings ./mach build --dev --no-default-features --features default-except-unstable
+  - env RUSTFLAGS=-Dwarnings ./mach build-geckolib
+  - env RUSTFLAGS=-Dwarnings ./mach test-stylo
   - bash ./etc/ci/lockfile_changed.sh
   - bash ./etc/ci/manifest_changed.sh
   - bash ./etc/ci/check_no_panic.sh
 
 linux-rel-wpt:
   - ./mach clean-nightlies --keep 3 --force
   - env CC=gcc-5 CXX=g++-5 ./mach build --release --with-debug-assertions
   - ./mach test-wpt-failure
@@ -115,42 +115,43 @@ linux-nightly:
   - ./mach package --release
   - ./mach upload-nightly linux
   - ./mach test-perf
   - python3 ./etc/ci/performance/download_buildbot_timings.py --verbose
   - aws s3 sync --size-only --acl public-read ./etc/ci/performance/output s3://servo-perf
 
 android:
   - ./mach clean-nightlies --keep 3 --force
-  - env ANDROID_SDK=/home/servo/android/sdk/r25.2.3 ./mach build --android --dev
+  - env ANDROID_SDK=/home/servo/android/sdk/r25.2.3 RUSTFLAGS=-Dwarnings ./mach build --android --dev
   - env ANDROID_SDK=/home/servo/android/sdk/r25.2.3 ./mach package --android --dev
   - bash ./etc/ci/lockfile_changed.sh
   - bash ./etc/ci/manifest_changed.sh
   - python ./etc/ci/check_dynamic_symbols.py
 
 android-nightly:
   - ./mach clean-nightlies --keep 3 --force
   - env ANDROID_SDK=/home/servo/android/sdk/r25.2.3 ./mach build --android --release
   - env ANDROID_SDK=/home/servo/android/sdk/r25.2.3 ./mach package --android --release
   - ./mach upload-nightly android
 
 arm32:
   - ./mach clean-nightlies --keep 3 --force
-  - env ./mach build --rel --target=arm-unknown-linux-gnueabihf
+  - env RUSTFLAGS=-Dwarnings ./mach build --rel --target=arm-unknown-linux-gnueabihf
   - bash ./etc/ci/lockfile_changed.sh
   - bash ./etc/ci/manifest_changed.sh
 
 arm64:
   - ./mach clean-nightlies --keep 3 --force
-  - env ./mach build --rel --target=aarch64-unknown-linux-gnu
+  - env RUSTFLAGS=-Dwarnings ./mach build --rel --target=aarch64-unknown-linux-gnu
   - bash ./etc/ci/lockfile_changed.sh
   - bash ./etc/ci/manifest_changed.sh
 
 windows-msvc-dev:
   - mach.bat clean-nightlies --keep 3 --force
+  - set RUSTFLAGS=-D warnings
   - mach.bat build --dev
   - mach.bat test-unit
   - mach.bat package --dev
   - mach.bat build-geckolib
   - mach.bat test-stylo
 
 windows-msvc-nightly:
   - mach.bat clean-nightlies --keep 3 --force
--- a/servo/ports/glutin/lib.rs
+++ b/servo/ports/glutin/lib.rs
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! A simple application that uses glutin to open a window for Servo to display in.
 
 
 #[macro_use] extern crate bitflags;
 extern crate compositing;
-#[cfg(target_os = "android")] extern crate egl;
 extern crate euclid;
 extern crate gleam;
 extern crate glutin;
 #[macro_use] extern crate log;
 extern crate msg;
 extern crate net_traits;
 #[cfg(any(target_os = "linux", target_os = "macos"))] extern crate osmesa_sys;
 extern crate script_traits;