]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust/ike: suppress some compile warnings when not debug
authorJason Ish <jason.ish@oisf.net>
Wed, 30 Jun 2021 16:03:35 +0000 (10:03 -0600)
committerJason Ish <jason.ish@oisf.net>
Wed, 30 Jun 2021 16:05:11 +0000 (10:05 -0600)
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

index f891dc4de80d06519d3623cd1a446d5115fd6bbf..d032c997b8a77b645874fdcd3f6f0983e27b775b 100644 (file)
@@ -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);
                     },
                     _ => (),