Project

General

Profile

Actions

Bug #2521

closed

rust: dns warning during compile

Added by Peter Manev over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Using - git master - ec77632 -
while compiling with rust enabled I get a small warning :

...
...
   Compiling build_const v0.2.1
   Compiling libc v0.2.42
   Compiling crc v1.7.0
   Compiling memchr v1.0.2
   Compiling nom v3.2.1
   Compiling ntp-parser v0.2.0
   Compiling rusticata-macros v0.4.1
   Compiling der-parser v0.5.5
   Compiling ipsec-parser v0.3.0
   Compiling kerberos-parser v0.1.4
   Compiling suricata v4.1.0-dev 
warning: unnecessary parentheses around method argument
   --> src/dns/dns.rs:917:22
    |
917 |         request.push((((dns_payload.len() as u16) & 0xff) as u8 + 1));
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
    |
    = note: #[warn(unused_parens)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 41.0 secs
     Running target/debug/deps/suricata-482e53093e473e04

running 13 tests
test dhcp::parser::tests::test_parse_discover ... ok
test dns::dns::tests::test_dns_parse_request_tcp_short_payload ... ok
test dns::dns::tests::test_dns_parse_request_tcp_valid ... ok
test dns::dns::tests::test_dns_parse_response_tcp_short_payload ... ok
test dns::dns::tests::test_dns_parse_response_tcp_valid ... ok
test dns::parser::tests::test_dns_parse_name ... ok
...
...

Using:

rustc 1.25.0 (84203cac6 2018-03-25)

Actions

Also available in: Atom PDF