Fixing warnings

This commit is contained in:
Tomasz Drwięga 2016-03-18 10:14:19 +01:00
parent 338e5fadb9
commit e58ec31e20
9 changed files with 22 additions and 9 deletions

View File

@ -67,6 +67,7 @@ pub trait Ext {
/// Returns Err, if we run out of gas.
/// Otherwise returns call_result which contains gas left
/// and true if subcall was successfull.
#[cfg_attr(feature="dev", allow(too_many_arguments))]
fn call(&mut self,
gas: &U256,
sender_address: &Address,

View File

@ -521,6 +521,7 @@ impl Interpreter {
Ok(overflowing!(offset.overflowing_add(size.clone())))
}
#[cfg_attr(feature="dev", allow(too_many_arguments))]
fn exec_instruction(&self,
gas: Gas,
params: &ActionParams,

View File

@ -370,7 +370,7 @@ impl Configuration {
fn init_nodes(&self, spec: &Spec) -> Vec<String> {
match self.args.flag_bootnodes {
Some(ref x) if x.len() > 0 => x.split(',').map(|s| {
Some(ref x) if !x.is_empty() => x.split(',').map(|s| {
Self::normalize_enode(s).unwrap_or_else(|| {
die!("{}: Invalid node address format given for a boot node.", s)
})
@ -409,6 +409,7 @@ impl Configuration {
ret
}
#[cfg_attr(feature="dev", allow(useless_format))]
fn client_config(&self) -> ClientConfig {
let mut client_config = ClientConfig::default();
match self.args.flag_cache {

View File

@ -175,6 +175,8 @@ impl JournalDB for ArchiveDB {
#[cfg(test)]
mod tests {
#![cfg_attr(feature="dev", allow(blacklisted_name))]
use common::*;
use super::*;
use hashdb::*;

View File

@ -527,6 +527,8 @@ impl JournalDB for EarlyMergeDB {
#[cfg(test)]
mod tests {
#![cfg_attr(feature="dev", allow(blacklisted_name))]
use common::*;
use super::*;
use super::super::traits::JournalDB;

View File

@ -358,6 +358,8 @@ impl HashDB for OverlayRecentDB {
#[cfg(test)]
mod tests {
#![cfg_attr(feature="dev", allow(blacklisted_name))]
use common::*;
use super::*;
use hashdb::*;

View File

@ -194,6 +194,8 @@ impl JournalDB for RefCountedDB {
#[cfg(test)]
mod tests {
#![cfg_attr(feature="dev", allow(blacklisted_name))]
use common::*;
use super::*;
use super::super::traits::JournalDB;

View File

@ -88,7 +88,7 @@ pub fn version_data() -> Bytes {
u32::from_str(env!("CARGO_PKG_VERSION_PATCH")).unwrap();
s.append(&v);
s.append(&"Parity");
s.append(&format!("{}", rustc_version()));
s.append(&rustc_version());
s.append(&&Target::os()[0..2]);
s.out()
}

View File

@ -216,6 +216,8 @@ fn can_map_external_address_or_fail() {
#[test]
fn ipv4_properties() {
#![cfg_attr(feature="dev", allow(too_many_arguments))]
fn check(octets: &[u8; 4], unspec: bool, loopback: bool,
private: bool, link_local: bool, global: bool,
multicast: bool, broadcast: bool, documentation: bool) {