mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-11-01 10:47:47 +00:00
Fix some SonarCloud complaints.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
2
.github/workflows/sonarcloud.yml
vendored
2
.github/workflows/sonarcloud.yml
vendored
@@ -55,7 +55,7 @@ jobs:
|
|||||||
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
|
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
|
||||||
--define sonar.organization=lnslbrty \
|
--define sonar.organization=lnslbrty \
|
||||||
--define sonar.projectKey=lnslbrty_nDPId \
|
--define sonar.projectKey=lnslbrty_nDPId \
|
||||||
--define sonar.exclusions=dependencies/uthash/tests/** \
|
--define sonar.exclusions=dependencies/uthash/src/** \
|
||||||
--define sonar.verbose=true \
|
--define sonar.verbose=true \
|
||||||
--define sonar.python.version=3.8 \
|
--define sonar.python.version=3.8 \
|
||||||
--define sonar.cfamily.gcov.reportsPath=coverage.xml
|
--define sonar.cfamily.gcov.reportsPath=coverage.xml
|
||||||
|
|||||||
8
dependencies/nDPIsrvd.h
vendored
8
dependencies/nDPIsrvd.h
vendored
@@ -277,7 +277,7 @@ static inline int nDPIsrvd_base64decode(char const * in, size_t inLen, unsigned
|
|||||||
|
|
||||||
while (in < end)
|
while (in < end)
|
||||||
{
|
{
|
||||||
unsigned char c = d[*(unsigned char *)in++];
|
unsigned char c = d[*(unsigned char const *)in++];
|
||||||
|
|
||||||
switch (c)
|
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)
|
static inline void nDPIsrvd_json_buffer_reset(struct nDPIsrvd_json_buffer * const json_buffer)
|
||||||
{
|
{
|
||||||
json_buffer->json_message_start = 0ul;
|
json_buffer->json_message_start = 0UL;
|
||||||
json_buffer->json_message_length = 0ull;
|
json_buffer->json_message_length = 0ULL;
|
||||||
json_buffer->json_message = NULL;
|
json_buffer->json_message = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +497,7 @@ static inline int nDPIsrvd_set_read_timeout(struct nDPIsrvd_socket * const sock,
|
|||||||
return 0;
|
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;
|
int flags;
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
static void nDPIsrvd_memprof_log(char const * const format, ...);
|
extern void nDPIsrvd_memprof_log(char const * const format, ...);
|
||||||
static void nDPIsrvd_memprof_log_alloc(size_t alloc_size);
|
extern void nDPIsrvd_memprof_log_alloc(size_t alloc_size);
|
||||||
static void nDPIsrvd_memprof_log_free(size_t free_size);
|
extern void nDPIsrvd_memprof_log_free(size_t free_size);
|
||||||
|
|
||||||
//#define VERBOSE_MEMORY_PROFILING 1
|
//#define VERBOSE_MEMORY_PROFILING 1
|
||||||
#define NO_MAIN 1
|
#define NO_MAIN 1
|
||||||
@@ -176,7 +176,7 @@ static unsigned long long int nDPIsrvd_free_bytes = 0;
|
|||||||
goto error; \
|
goto error; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static void nDPIsrvd_memprof_log(char const * const format, ...)
|
void nDPIsrvd_memprof_log(char const * const format, ...)
|
||||||
{
|
{
|
||||||
#ifdef VERBOSE_MEMORY_PROFILING
|
#ifdef VERBOSE_MEMORY_PROFILING
|
||||||
int logbuf_used, logbuf_used_tmp;
|
int logbuf_used, logbuf_used_tmp;
|
||||||
|
|||||||
Reference in New Issue
Block a user