1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

Fix warnings.

Ref #374
This commit is contained in:
Ryan Dahl 2018-08-29 18:50:46 -04:00
parent b2cd71ddce
commit 902e6e2ee6
4 changed files with 15 additions and 3 deletions

View file

@ -2,4 +2,5 @@ import("//build_extra/rust/rust.gni")
rust_crate("flatbuffers") { rust_crate("flatbuffers") {
source_root = "//third_party/flatbuffers/rust/flatbuffers/src/lib.rs" source_root = "//third_party/flatbuffers/rust/flatbuffers/src/lib.rs"
args = [ "-Aunused_variables" ] # TODO Remove this.
} }

View file

@ -69,6 +69,7 @@ rust_crate("cfg_if") {
rust_crate("sha1") { rust_crate("sha1") {
source_root = "$registry_github/sha1-0.6.0/src/lib.rs" source_root = "$registry_github/sha1-0.6.0/src/lib.rs"
args = [ "-Aunused_parens" ] # https://github.com/mitsuhiko/rust-sha1/issues/36
} }
rust_crate("tempfile") { rust_crate("tempfile") {
@ -259,6 +260,11 @@ rust_crate("iovec") {
rust_crate("lazycell") { rust_crate("lazycell") {
source_root = "$registry_github/lazycell-0.6.0/src/lib.rs" source_root = "$registry_github/lazycell-0.6.0/src/lib.rs"
args = [
# TODO Remove these:
"-Aunused_unsafe",
"-Aunused_mut",
]
} }
rust_crate("net2") { rust_crate("net2") {
@ -367,6 +373,11 @@ rust_crate("hyper") {
":tokio_timer", ":tokio_timer",
":want", ":want",
] ]
args = [
# TODO Remove these.
"-Adeprecated",
"-Aunused_imports",
]
} }
rust_crate("tokio_core") { rust_crate("tokio_core") {

View file

@ -38,7 +38,7 @@ TEST(FileUtilTest, ExePath) {
EXPECT_TRUE(exe_path.find("/") == 0 || exe_path.find(":\\") == 1); EXPECT_TRUE(exe_path.find("/") == 0 || exe_path.find(":\\") == 1);
// FIlename is the name of the test binary. // FIlename is the name of the test binary.
std::string exe_filename = deno::Basename(exe_path); std::string exe_filename = deno::Basename(exe_path);
EXPECT_EQ(exe_filename.find("test_cc"), 0); EXPECT_EQ(exe_filename.find("test_cc"), 0u);
// Path exists (also tests ReadFileToString). // Path exists (also tests ReadFileToString).
std::string contents; std::string contents;
EXPECT_TRUE(deno::ReadFileToString(exe_path.c_str(), &contents)); EXPECT_TRUE(deno::ReadFileToString(exe_path.c_str(), &contents));

View file

@ -469,10 +469,10 @@ fn handle_read_file_sync(
fn handle_write_file_sync( fn handle_write_file_sync(
d: *const DenoC, d: *const DenoC,
builder: &mut FlatBufferBuilder, _builder: &mut FlatBufferBuilder,
filename: &str, filename: &str,
data: &[u8], data: &[u8],
perm: u32, _perm: u32,
) -> HandlerResult { ) -> HandlerResult {
debug!("handle_write_file_sync {}", filename); debug!("handle_write_file_sync {}", filename);
let deno = from_c(d); let deno = from_c(d);