aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/quic.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2021-08-20 18:11:13 +0200
committerGitHub <noreply@github.com>2021-08-20 18:11:13 +0200
commit8fdffbf3a17ebfc8e7043264cce516d23e9f5345 (patch)
treea6ba2b4db0813272b8f54deb65e4fa15490245a6 /src/lib/protocols/quic.c
parent55eec29c08fa2cf66f5f3ef8868ce4e0de52111f (diff)
Compile everything with "-W -Wall -Wno-unused-parameter" flags (#1276)
Fix all the warnings. Getting rid of "-Wno-unused-parameter" is quite complex because some parameters usage depends on compilation variable (i.e. `--enable-debug-messages`). The "-Werror" flag has been added only in Travis builds to avoid breaking the builds to users using uncommon/untested OS/compiler/enviroment. Tested on: * x86_64; Ubuntu 20.04; gcc 7,8,9,10,11; clang 7,8,9,10,11,12 * x86_64; CentOS 7.7; gcc 4.8.5 (with "--disable-gcrypt" flag) * Raspberry 4; Debian 10.10; gcc 8.3.0
Diffstat (limited to 'src/lib/protocols/quic.c')
-rw-r--r--src/lib/protocols/quic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c
index 999ea61e5..a508c30ef 100644
--- a/src/lib/protocols/quic.c
+++ b/src/lib/protocols/quic.c
@@ -1010,7 +1010,7 @@ static int __reassemble(struct ndpi_flow_struct *flow, const u_int8_t *frag,
uint64_t frag_len, uint64_t frag_offset,
const u_int8_t **buf, u_int64_t *buf_len)
{
- const int max_quic_reasm_buffer_len = 4096; /* Let's say a couple of full-MTU packets... */
+ const uint64_t max_quic_reasm_buffer_len = 4096; /* Let's say a couple of full-MTU packets... */
/* TODO: at the moment, this function is only a little more than a stub.
We should reassemble the fragments, but nDPI lacks any proper generic
@@ -1580,7 +1580,7 @@ static void ndpi_search_quic(struct ndpi_detection_module_struct *ndpi_struct,
{
u_int32_t version;
u_int8_t *clear_payload;
- uint32_t clear_payload_len;
+ uint32_t clear_payload_len = 0;
const u_int8_t *crypto_data;
uint64_t crypto_data_len;
int is_quic;