fix various warnings

This commit is contained in:
Erick Tryzelaar 2013-08-30 15:06:11 -07:00
parent 6a225951e3
commit 91d6c60bed
13 changed files with 11 additions and 30 deletions

View file

@ -28,7 +28,6 @@ use std::io;
use std::os;
use std::result::{Ok, Err};
use std::task;
use std::u64;
use std::uint;
fn fib(n: int) -> int {

View file

@ -13,11 +13,8 @@
extern mod cci_const;
use cci_const::bar;
use std::cast::transmute;
static foo: extern "C" fn() = bar;
pub fn main() {
unsafe {
assert_eq!(foo, bar);
}
assert_eq!(foo, bar);
}

View file

@ -18,8 +18,6 @@ struct S {
}
pub fn main() {
unsafe {
assert_eq!(foopy, f);
assert_eq!(f, s.f);
}
assert_eq!(foopy, f);
assert_eq!(f, s.f);
}

View file

@ -15,7 +15,7 @@ extern fn voidret2() {}
extern fn uintret() -> uint { 22 }
extern fn uintvoidret(x: uint) {}
extern fn uintvoidret(_x: uint) {}
extern fn uintuintuintuintret(x: uint, y: uint, z: uint) -> uint { x+y+z }

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::cast::transmute;
extern fn f() {
}
@ -17,12 +15,10 @@ extern fn g() {
}
pub fn main() {
unsafe {
let a: extern "C" fn() = f;
let b: extern "C" fn() = f;
let c: extern "C" fn() = g;
let a: extern "C" fn() = f;
let b: extern "C" fn() = f;
let c: extern "C" fn() = g;
assert_eq!(a, b);
assert!(a != c);
}
assert_eq!(a, b);
assert!(a != c);
}

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::io;
struct T (&'static [int]);
static t : T = T (&'static [5, 4, 3]);
fn main () {

View file

@ -10,8 +10,6 @@
// xfail-fast
use std::int;
trait vec_monad<A> {
fn bind<B>(&self, f: &fn(&A) -> ~[B]) -> ~[B];
}

View file

@ -10,7 +10,6 @@
// xfail-fast
use std::int;
use std::libc::c_void;
use std::ptr;
use std::sys;

View file

@ -10,8 +10,6 @@
// xfail-fast
use std::uint;
pub trait plus {
fn plus(&self) -> int;
}

View file

@ -10,8 +10,6 @@
// xfail-fast
use std::int;
trait to_str {
fn to_string(&self) -> ~str;
}