From 1de7fd9bf002c3cad58756c9e304b49a9d34978e Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Tue, 29 Aug 2023 18:08:56 +0200 Subject: Warning fixes --- src/lib/ndpi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index d1c4e3746..41e4fb539 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -4238,9 +4238,9 @@ int ndpi_load_categories_dir(struct ndpi_detection_module_struct *ndpi_str, underscore[0] = '\0'; proto_id = (ndpi_protocol_category_t)atoi(dp->d_name); - if((proto_id > 0) && (proto_id < NDPI_LAST_IMPLEMENTED_PROTOCOL)) { + if((proto_id > 0) && (proto_id < (u_int16_t)NDPI_LAST_IMPLEMENTED_PROTOCOL)) { /* Valid file */ - char path[256]; + char path[512]; underscore[0] = '_'; snprintf(path, sizeof(path), "%s/%s", dir_path, dp->d_name); -- cgit v1.2.3