aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2024-02-13 07:21:47 +0100
committerToni Uhlig <matzeton@googlemail.com>2024-02-13 07:21:47 +0100
commit8af37b3770843f415f1d8786019686a3b6a0a153 (patch)
tree3fef1f21b537a6bd792ff5c7c4d3463b4d7e465f
parent8949ba39e63cd7eeb279f20a74db834d02de1bc1 (diff)
Fix some SonarCloud complaints.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--.github/workflows/sonarcloud.yml2
-rw-r--r--dependencies/nDPIsrvd.h8
-rw-r--r--nDPId-test.c8
3 files changed, 9 insertions, 9 deletions
diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
index b788be5f8..7004f157d 100644
--- a/.github/workflows/sonarcloud.yml
+++ b/.github/workflows/sonarcloud.yml
@@ -55,7 +55,7 @@ jobs:
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
--define sonar.organization=lnslbrty \
--define sonar.projectKey=lnslbrty_nDPId \
- --define sonar.exclusions=dependencies/uthash/tests/** \
+ --define sonar.exclusions=dependencies/uthash/src/** \
--define sonar.verbose=true \
--define sonar.python.version=3.8 \
--define sonar.cfamily.gcov.reportsPath=coverage.xml
diff --git a/dependencies/nDPIsrvd.h b/dependencies/nDPIsrvd.h
index 67fa40b07..486dbaa69 100644
--- a/dependencies/nDPIsrvd.h
+++ b/dependencies/nDPIsrvd.h
@@ -277,7 +277,7 @@ static inline int nDPIsrvd_base64decode(char const * in, size_t inLen, unsigned
while (in < end)
{
- unsigned char c = d[*(unsigned char *)in++];
+ unsigned char c = d[*(unsigned char const *)in++];
switch (c)
{
@@ -402,8 +402,8 @@ static inline void nDPIsrvd_buffer_free(struct nDPIsrvd_buffer * const buffer)
static inline void nDPIsrvd_json_buffer_reset(struct nDPIsrvd_json_buffer * const json_buffer)
{
- json_buffer->json_message_start = 0ul;
- json_buffer->json_message_length = 0ull;
+ json_buffer->json_message_start = 0UL;
+ json_buffer->json_message_length = 0ULL;
json_buffer->json_message = NULL;
}
@@ -497,7 +497,7 @@ static inline int nDPIsrvd_set_read_timeout(struct nDPIsrvd_socket * const sock,
return 0;
}
-static inline int nDPIsrvd_set_nonblock(struct nDPIsrvd_socket * const sock)
+static inline int nDPIsrvd_set_nonblock(struct nDPIsrvd_socket const * const sock)
{
int flags;
diff --git a/nDPId-test.c b/nDPId-test.c
index 16254ed60..7d57c696d 100644
--- a/nDPId-test.c
+++ b/nDPId-test.c
@@ -3,9 +3,9 @@
#include <stdarg.h>
#include <unistd.h>
-static void nDPIsrvd_memprof_log(char const * const format, ...);
-static void nDPIsrvd_memprof_log_alloc(size_t alloc_size);
-static void nDPIsrvd_memprof_log_free(size_t free_size);
+extern void nDPIsrvd_memprof_log(char const * const format, ...);
+extern void nDPIsrvd_memprof_log_alloc(size_t alloc_size);
+extern void nDPIsrvd_memprof_log_free(size_t free_size);
//#define VERBOSE_MEMORY_PROFILING 1
#define NO_MAIN 1
@@ -176,7 +176,7 @@ static unsigned long long int nDPIsrvd_free_bytes = 0;
goto error; \
} while (0)
-static void nDPIsrvd_memprof_log(char const * const format, ...)
+void nDPIsrvd_memprof_log(char const * const format, ...)
{
#ifdef VERBOSE_MEMORY_PROFILING
int logbuf_used, logbuf_used_tmp;