From 40d7354dd7cedb80bcf1eb5a0480c7efc85eafc1 Mon Sep 17 00:00:00 2001 From: Zied Aouini Date: Fri, 22 Jul 2022 21:58:25 +0200 Subject: Windows error C2466 fix (array size init with 0). --- src/include/ndpi_typedefs.h | 2 +- src/lib/ndpi_utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 563a6672b..bcbdab296 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -998,7 +998,7 @@ typedef struct _ndpi_automa { typedef struct ndpi_str_hash { unsigned int hash; void *value; - u_int8_t private_data[1]; /* Avoid error C2466 */ + // u_int8_t private_data[1]; /* Avoid error C2466 and do not initiate private data with 0 */ } ndpi_str_hash; typedef struct ndpi_proto { diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 7622245d1..6f8b4603c 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -77,7 +77,7 @@ struct pcre_struct { typedef struct ndpi_str_hash_private { unsigned int hash; void *value; - u_int8_t private_data[1]; + // u_int8_t private_data[1]; /* Avoid error C2466 and do not initiate private data with 0 */ UT_hash_handle hh; } ndpi_str_hash_private; #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L -- cgit v1.2.3