Disable -Wno-unused-parameter -Wno-unused-function. (#2358)
* unused parameters and functions pollute the code and decrease readability Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -42,8 +42,7 @@ static void ndpi_int_ftp_control_add_connection(struct ndpi_detection_module_str
|
||||
|
||||
/* *************************************************************** */
|
||||
|
||||
static int ndpi_ftp_control_check_request(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
static int ndpi_ftp_control_check_request(struct ndpi_flow_struct *flow,
|
||||
const u_int8_t *payload,
|
||||
size_t payload_len) {
|
||||
#ifdef FTP_DEBUG
|
||||
@@ -59,7 +58,7 @@ static int ndpi_ftp_control_check_request(struct ndpi_detection_module_struct *n
|
||||
|
||||
snprintf(buf, sizeof(buf), "Found FTP username (%s)",
|
||||
flow->l4.tcp.ftp_imap_pop_smtp.username);
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_CLEAR_TEXT_CREDENTIALS, buf);
|
||||
ndpi_set_risk(flow, NDPI_CLEAR_TEXT_CREDENTIALS, buf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -555,8 +554,7 @@ static int ndpi_ftp_control_check_request(struct ndpi_detection_module_struct *n
|
||||
/* *************************************************************** */
|
||||
|
||||
static int ndpi_ftp_control_check_response(struct ndpi_flow_struct *flow,
|
||||
const u_int8_t *payload,
|
||||
size_t payload_len) {
|
||||
const u_int8_t *payload) {
|
||||
#ifdef FTP_DEBUG
|
||||
printf("%s() [%.*s]\n", __FUNCTION__, (int)payload_len, payload);
|
||||
#endif
|
||||
@@ -604,8 +602,8 @@ static void ndpi_check_ftp_control(struct ndpi_detection_module_struct *ndpi_str
|
||||
if(flow->ftp_control_stage == 0) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "FTP_CONTROL stage 0: \n");
|
||||
|
||||
if((payload_len > 0) && ndpi_ftp_control_check_request(ndpi_struct,
|
||||
flow, packet->payload, payload_len)) {
|
||||
if((payload_len > 0) && ndpi_ftp_control_check_request(flow,
|
||||
packet->payload, payload_len)) {
|
||||
NDPI_LOG_DBG2(ndpi_struct,
|
||||
"Possible FTP_CONTROL request detected, we will look further for the response..\n");
|
||||
|
||||
@@ -627,7 +625,7 @@ static void ndpi_check_ftp_control(struct ndpi_detection_module_struct *ndpi_str
|
||||
}
|
||||
|
||||
/* This is a packet in another direction. Check if we find the proper response. */
|
||||
if((payload_len > 0) && ndpi_ftp_control_check_response(flow, packet->payload, payload_len)) {
|
||||
if((payload_len > 0) && ndpi_ftp_control_check_response(flow, packet->payload)) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found FTP_CONTROL\n");
|
||||
|
||||
#ifdef FTP_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user