From c37f4b7e54af7a747fbadeaa02ccf9a13d89505e Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 30 Jun 2021 10:03:35 -0600 Subject: [PATCH] rust/ike: suppress some compile warnings when not debug Due to ef5755338fa6404b60e7f90bfbaca039b2bfda1e, the variables that are only used for debug output now emit unused variable warnings when Suricata is not built with debug. Prefix these variables with _ to suppress these warnings. --- rust/src/ikev2/ikev2.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/src/ikev2/ikev2.rs b/rust/src/ikev2/ikev2.rs index f891dc4de8..d032c997b8 100644 --- a/rust/src/ikev2/ikev2.rs +++ b/rust/src/ikev2/ikev2.rs @@ -176,8 +176,8 @@ impl IKEV2State { self.dh_group = kex.dh_group; } }, - IkeV2PayloadContent::Nonce(ref n) => { - SCLogDebug!("Nonce: {:?}", n); + IkeV2PayloadContent::Nonce(ref _n) => { + SCLogDebug!("Nonce: {:?}", _n); }, IkeV2PayloadContent::Notify(ref n) => { SCLogDebug!("Notify: {:?}", n); @@ -205,7 +205,7 @@ impl IKEV2State { } }; }, - e => { SCLogDebug!("parse_ikev2_payload_with_type: {:?}",e); () }, + _e => { SCLogDebug!("parse_ikev2_payload_with_type: {:?}", _e); () }, } 1 }, @@ -330,8 +330,8 @@ impl IKEV2State { _ => (), } }, - IkeV2Transform::Unknown(tx_type,tx_id) => { - SCLogDebug!("Unknown proposal: type={:?}, id={}", tx_type, tx_id); + IkeV2Transform::Unknown(_tx_type, _tx_id) => { + SCLogDebug!("Unknown proposal: type={:?}, id={}", _tx_type, _tx_id); self.set_event(IKEV2Event::UnknownProposal); }, _ => (), -- 2.47.2