Skip to content

Commit

Permalink
rust/ike: suppress some compile warnings when not debug
Browse files Browse the repository at this point in the history
Due to ef57553, 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.
  • Loading branch information
jasonish committed Jun 30, 2021
1 parent 6a53185 commit c37f4b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rust/src/ikev2/ikev2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -205,7 +205,7 @@ impl IKEV2State {
}
};
},
e => { SCLogDebug!("parse_ikev2_payload_with_type: {:?}",e); () },
_e => { SCLogDebug!("parse_ikev2_payload_with_type: {:?}", _e); () },
}
1
},
Expand Down Expand Up @@ -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);
},
_ => (),
Expand Down

0 comments on commit c37f4b7

Please sign in to comment.