Fix some SonarCloud complaints.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2024-02-13 07:21:47 +01:00
parent 8949ba39e6
commit 8af37b3770
3 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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;