diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-07-04 14:33:18 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-07-04 14:33:18 +0200 |
commit | d4888dbd4dbb09a6d076caaffac6da68abd8f359 (patch) | |
tree | 0c4e2a80c9d564f7ecbf6043c5a39e338dfc3523 /components | |
parent | 0298c92670bee90c06f98fac2e8469d1238d1bd4 (diff) | |
download | servo-d4888dbd4dbb09a6d076caaffac6da68abd8f359.tar.gz servo-d4888dbd4dbb09a6d076caaffac6da68abd8f359.zip |
Fix build warnings.
Diffstat (limited to 'components')
-rw-r--r-- | components/gfx/lib.rs | 5 | ||||
-rw-r--r-- | components/gfx/paint_context.rs | 2 | ||||
-rw-r--r-- | components/layout/display_list_builder.rs | 2 | ||||
-rw-r--r-- | components/layout/layout_task.rs | 1 | ||||
-rw-r--r-- | components/layout/lib.rs | 1 | ||||
-rw-r--r-- | components/util/deque/mod.rs | 6 |
6 files changed, 7 insertions, 10 deletions
diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index fb9e36884a1..b42e05375be 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -3,13 +3,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #![feature(arc_weak)] -#![feature(box_raw)] +#![cfg_attr(any(target_os="linux", target_os = "android"), feature(box_raw))] #![feature(box_syntax)] #![feature(custom_attribute)] #![feature(custom_derive)] -#![feature(float_consts)] #![feature(hashmap_hasher)] -#![feature(heap_api)] +#![cfg_attr(any(target_os="linux", target_os = "android"), feature(heap_api))] #![feature(iter_cmp)] #![feature(plugin)] #![feature(str_char)] diff --git a/components/gfx/paint_context.rs b/components/gfx/paint_context.rs index 57b6b1feba2..6e45c5354e5 100644 --- a/components/gfx/paint_context.rs +++ b/components/gfx/paint_context.rs @@ -590,7 +590,7 @@ impl<'a> PaintContext<'a> { bounds.origin.y + radii.top_right), radii.top_right, 1.5f32 * f32::consts::FRAC_PI_2, - f32::consts::PI_2, + 2.0f32 * f32::consts::PI, false); // 3 path_builder.line_to(Point2D::new(bounds.max_x(), bounds.max_y() - radii.bottom_right)); // 4 path_builder.arc(Point2D::new(bounds.max_x() - radii.bottom_right, diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index e97dca0c17b..7a6f3928aca 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -1163,7 +1163,7 @@ impl FragmentDisplayListBuilding for Fragment { for operation in operations { let matrix = match operation { &transform::ComputedOperation::Rotate(ax, ay, az, theta) => { - let theta = f32::consts::PI_2 - theta.radians(); + let theta = 2.0f32 * f32::consts::PI - theta.radians(); Matrix4::create_rotation(ax, ay, az, theta) } &transform::ComputedOperation::Perspective(d) => { diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 172fcf2ed3f..35ffc56fa05 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -63,7 +63,6 @@ use std::collections::HashMap; use std::collections::hash_state::DefaultState; use std::mem::transmute; use std::ops::{Deref, DerefMut}; -use std::ptr; use std::sync::mpsc::{channel, Sender, Receiver, Select}; use std::sync::{Arc, Mutex, MutexGuard}; use style::computed_values::{filter, mix_blend_mode}; diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 682b5ea3aec..01a544734de 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -6,7 +6,6 @@ #![feature(arc_unique)] #![feature(box_syntax)] #![feature(filling_drop)] -#![feature(float_consts)] #![feature(hashmap_hasher)] #![feature(heap_api)] #![feature(mpsc_select)] diff --git a/components/util/deque/mod.rs b/components/util/deque/mod.rs index 490bcc15952..41329c60195 100644 --- a/components/util/deque/mod.rs +++ b/components/util/deque/mod.rs @@ -52,7 +52,7 @@ pub use self::Stolen::{Empty, Abort, Data}; use std::sync::Arc; use std::rt::heap::{allocate, deallocate}; use std::marker; -use std::mem::{forget, min_align_of, size_of, transmute}; +use std::mem::{forget, align_of, size_of, transmute}; use std::ptr; use std::sync::Mutex; @@ -354,7 +354,7 @@ fn buffer_alloc_size<T>(log_size: usize) -> usize { impl<T> Buffer<T> { unsafe fn new(log_size: usize) -> Buffer<T> { let size = buffer_alloc_size::<T>(log_size); - let buffer = allocate(size, min_align_of::<T>()); + let buffer = allocate(size, align_of::<T>()); if buffer.is_null() { ::alloc::oom() } Buffer { storage: buffer as *const T, @@ -403,6 +403,6 @@ impl<T> Drop for Buffer<T> { fn drop(&mut self) { // It is assumed that all buffers are empty on drop. let size = buffer_alloc_size::<T>(self.log_size); - unsafe { deallocate(self.storage as *mut u8, size, min_align_of::<T>()) } + unsafe { deallocate(self.storage as *mut u8, size, align_of::<T>()) } } } |