From: Jason Ish Date: Wed, 30 Jun 2021 16:03:35 +0000 (-0600) Subject: rust/ike: suppress some compile warnings when not debug X-Git-Tag: suricata-6.0.3~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c37f4b7e54af7a747fbadeaa02ccf9a13d89505e;p=thirdparty%2Fsuricata.git 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. --- 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); }, _ => (),