From 41eef9246c6a3055e3876e3dd7aeaadecb4b76c0 Mon Sep 17 00:00:00 2001 From: Toni Date: Wed, 3 Apr 2024 14:10:21 +0200 Subject: Disable `-Wno-unused-parameter -Wno-unused-function`. (#2358) * unused parameters and functions pollute the code and decrease readability Signed-off-by: Toni Uhlig --- src/lib/protocols/ftp_data.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/protocols/ftp_data.c') diff --git a/src/lib/protocols/ftp_data.c b/src/lib/protocols/ftp_data.c index 567669e3d..048097156 100644 --- a/src/lib/protocols/ftp_data.c +++ b/src/lib/protocols/ftp_data.c @@ -34,7 +34,7 @@ static void ndpi_int_ftp_data_add_connection(struct ndpi_detection_module_struct ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_FTP_DATA, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); } -static int ndpi_match_ftp_data_port(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { +static int ndpi_match_ftp_data_port(struct ndpi_detection_module_struct *ndpi_struct) { struct ndpi_packet_struct *packet = &ndpi_struct->packet; /* Check connection over TCP */ @@ -46,7 +46,7 @@ static int ndpi_match_ftp_data_port(struct ndpi_detection_module_struct *ndpi_st return 0; } -static int ndpi_match_ftp_data_directory(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { +static int ndpi_match_ftp_data_directory(struct ndpi_detection_module_struct *ndpi_struct) { struct ndpi_packet_struct *packet = &ndpi_struct->packet; u_int32_t payload_len = packet->payload_packet_len; @@ -70,7 +70,7 @@ static int ndpi_match_ftp_data_directory(struct ndpi_detection_module_struct *nd return 0; } -static int ndpi_match_file_header(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { +static int ndpi_match_file_header(struct ndpi_detection_module_struct *ndpi_struct) { struct ndpi_packet_struct *packet = &ndpi_struct->packet; u_int32_t payload_len = packet->payload_packet_len; @@ -235,9 +235,9 @@ static void ndpi_check_ftp_data(struct ndpi_detection_module_struct *ndpi_struct */ if(ndpi_seen_flow_beginning(flow)) { if((packet->payload_packet_len > 0) - && (ndpi_match_file_header(ndpi_struct, flow) - || ndpi_match_ftp_data_directory(ndpi_struct, flow) - || ndpi_match_ftp_data_port(ndpi_struct, flow) + && (ndpi_match_file_header(ndpi_struct) + || ndpi_match_ftp_data_directory(ndpi_struct) + || ndpi_match_ftp_data_port(ndpi_struct) ) ) { NDPI_LOG_INFO(ndpi_struct, "found FTP_DATA request\n"); -- cgit v1.2.3