Fix build warnings.

This commit is contained in:
Ms2ger 2015-07-04 14:33:18 +02:00
parent 0298c92670
commit d4888dbd4d
7 changed files with 8 additions and 10 deletions

View file

@ -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)]

View file

@ -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,

View file

@ -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) => {

View file

@ -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};

View file

@ -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)]

View file

@ -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>()) }
}
}

View file

@ -69,6 +69,7 @@ const CMD_OR_ALT : constellation_msg::KeyModifiers = SUPER;
const CMD_OR_ALT : constellation_msg::KeyModifiers = ALT;
// This should vary by zoom level and maybe actual text size (focused or under cursor)
#[cfg(feature = "window")]
const LINE_HEIGHT : f32 = 38.0;
/// The type of a window.