From: Shivani Bhardwaj Date: Fri, 21 Jul 2023 12:23:49 +0000 (+0530) Subject: rust: fix compiler warnings X-Git-Tag: suricata-6.0.14~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71ebd0bd77975c0f7b009c2833362dd6e442243f;p=thirdparty%2Fsuricata.git rust: fix compiler warnings --- diff --git a/rust/src/dcerpc/dcerpc.rs b/rust/src/dcerpc/dcerpc.rs index e922fb3ac0..bf524a1610 100644 --- a/rust/src/dcerpc/dcerpc.rs +++ b/rust/src/dcerpc/dcerpc.rs @@ -767,7 +767,7 @@ impl DCERPCState { if let Some(ref mut bind) = self.bind { let mut uuid_internal_id = 0; for r in back.ctxitems.iter() { - for mut uuid in bind.uuid_list.iter_mut() { + for uuid in bind.uuid_list.iter_mut() { if uuid.internal_id == uuid_internal_id { uuid.result = r.ack_result; if uuid.result != 0 { diff --git a/rust/src/ssh/ssh.rs b/rust/src/ssh/ssh.rs index 50cf6e30f2..18bb458e8d 100644 --- a/rust/src/ssh/ssh.rs +++ b/rust/src/ssh/ssh.rs @@ -146,7 +146,7 @@ impl SSHState { fn parse_record( &mut self, mut input: &[u8], resp: bool, pstate: *mut std::os::raw::c_void, ) -> AppLayerResult { - let (mut hdr, ohdr) = if !resp { + let (hdr, ohdr) = if !resp { (&mut self.transaction.cli_hdr, &self.transaction.srv_hdr) } else { (&mut self.transaction.srv_hdr, &self.transaction.cli_hdr) @@ -276,7 +276,7 @@ impl SSHState { fn parse_banner( &mut self, input: &[u8], resp: bool, pstate: *mut std::os::raw::c_void, ) -> AppLayerResult { - let mut hdr = if !resp { + let hdr = if !resp { &mut self.transaction.cli_hdr } else { &mut self.transaction.srv_hdr