Skip to content

Commit

Permalink
Changed shootout-fasta-redux to use size_t when calling fwrite, remov…
Browse files Browse the repository at this point in the history
…ed XFAIL
  • Loading branch information
Thiez committed Apr 21, 2013
1 parent 2104cd6 commit 91d1d00
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/test/bench/shootout-fasta-redux.rs
@@ -1,8 +1,6 @@
// xfail-test FIXME #5985 Doesn't typecheck on x86

use core::cast::transmute;
use core::from_str::FromStr;
use core::libc::{FILE, STDOUT_FILENO, c_int, fdopen, fputc, fputs, fwrite};
use core::libc::{FILE, STDOUT_FILENO, c_int, fdopen, fputc, fputs, fwrite, size_t};
use core::uint::{min, range};
use core::vec::bytes::copy_memory;

Expand Down Expand Up @@ -101,7 +99,7 @@ impl RepeatFasta {
let mut pos = 0, bytes, n = n;
while n > 0 {
bytes = min(LINE_LEN, n);
fwrite(transmute(&buf[pos]), bytes as u64, 1, stdout);
fwrite(transmute(&buf[pos]), bytes as size_t, 1, stdout);
fputc('\n' as c_int, stdout);
pos += bytes;
if pos > alu_len {
Expand Down Expand Up @@ -166,14 +164,14 @@ impl RandomFasta {
}
buf[LINE_LEN] = '\n' as u8;
fwrite(transmute(&buf[0]),
LINE_LEN as u64 + 1,
LINE_LEN as size_t + 1,
1,
self.stdout);
}
for range(0, chars_left) |i| {
buf[i] = self.nextc();
}
fwrite(transmute(&buf[0]), chars_left as u64, 1, self.stdout);
fwrite(transmute(&buf[0]), chars_left as size_t, 1, self.stdout);
}
}
}
Expand Down

5 comments on commit 91d1d00

@bors
Copy link
Contributor

@bors bors commented on 91d1d00 Apr 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from catamorphism
at Thiez@91d1d00

@bors
Copy link
Contributor

@bors bors commented on 91d1d00 Apr 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging Thiez/rust/fixbench = 91d1d00 into auto

@bors
Copy link
Contributor

@bors bors commented on 91d1d00 Apr 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thiez/rust/fixbench = 91d1d00 merged ok, testing candidate = 8942099

@bors
Copy link
Contributor

@bors bors commented on 91d1d00 Apr 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 91d1d00 Apr 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = 8942099

Please sign in to comment.