From: Shivani Bhardwaj Date: Tue, 16 Jul 2019 08:39:13 +0000 (+0530) Subject: rust: fix compiler warning X-Git-Tag: suricata-5.0.0-rc1~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbfd706e1fd78e838f55345c02218b270ba11276;p=thirdparty%2Fsuricata.git rust: fix compiler warning rustc 1.36 introduced: error: variable does not need to be mutable --> src/dhcp/parser.rs:202:17 | 202 | let mut malformed_options = false; | ----^^^^^^^^^^^^^^^^^ | | | help: remove this `mut` | note: lint level defined here --> src/lib.rs:18:38 | 18 | #![cfg_attr(feature = "strict", deny(warnings))] | ^^^^^^^^ = note: #[deny(unused_mut)] implied by #[deny(warnings)] error: aborting due to previous error error: Could not compile `suricata`. Ticket #3072. --- diff --git a/rust/src/dhcp/parser.rs b/rust/src/dhcp/parser.rs index 6b7402cd7b..55a1be6037 100644 --- a/rust/src/dhcp/parser.rs +++ b/rust/src/dhcp/parser.rs @@ -199,7 +199,7 @@ pub fn dhcp_parse(input: &[u8]) -> IResult<&[u8], DHCPMessage> { Ok((rem, header)) => { let mut options = Vec::new(); let mut next = rem; - let mut malformed_options = false; + let malformed_options = false; let mut truncated_options = false; loop { match parse_option(next) {