summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/HPM.c2
-rw-r--r--src/common/socket.c4
-rw-r--r--src/common/timer.c4
3 files changed, 1 insertions, 9 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index c34828010..ff1371b14 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -898,7 +898,7 @@ bool hplugins_parse_conf(const struct config_t *config, const char *filename, en
for (i = 0; i < VECTOR_LENGTH(HPM->config_listeners[point]); i++) {
const struct HPConfListenStorage *entry = &VECTOR_INDEX(HPM->config_listeners[point], i);
const char *config_name = entry->key;
- const char *str = buf;
+ const char *str = NULL;
if ((setting = libconfig->lookup(config, config_name)) == NULL) {
if (!imported && entry->required) {
ShowWarning("Missing configuration '%s' in file %s!\n", config_name, filename);
diff --git a/src/common/socket.c b/src/common/socket.c
index 5f284587a..d4b8bb43f 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1023,10 +1023,6 @@ int do_sockets(int next)
}
}
-#ifdef __clang_analyzer__
- // Let Clang's static analyzer know this never happens (it thinks it might because of a NULL check in session_is_valid)
- if (!sockt->session[i]) continue;
-#endif // __clang_analyzer__
sockt->session[i]->func_parse(i);
if(!sockt->session[i])
diff --git a/src/common/timer.c b/src/common/timer.c
index 0b28f6a06..f820ebe12 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -258,10 +258,6 @@ int64 timer_gettick(void) {
/// Adds a timer to the timer_heap
static void push_timer_heap(int tid) {
BHEAP_ENSURE(timer_heap, 1, 256);
-#ifdef __clang_analyzer__ // Clang's static analyzer warns that BHEAP_ENSURE might set BHEAP_DATA(timer_heap) to NULL.
-#include "assert.h"
- assert(BHEAP_DATA(timer_heap) != NULL);
-#endif // __clang_analyzer__
BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, swap);
}