[master] 2bd3a2f58 Initialize static const variables
Nils Goroll
nils.goroll at uplex.de
Thu Oct 31 20:31:06 UTC 2024
commit 2bd3a2f5869d470b67faba88131a2d2fda5eac6e
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Oct 31 21:01:03 2024 +0100
Initialize static const variables
Reported by Su^WOracle CC 12.6
diff --git a/bin/varnishd/cache/cache_vrt_filter.c b/bin/varnishd/cache/cache_vrt_filter.c
index 6bf1ba06e..18077c220 100644
--- a/bin/varnishd/cache/cache_vrt_filter.c
+++ b/bin/varnishd/cache/cache_vrt_filter.c
@@ -188,7 +188,7 @@ VRT_RemoveVDP(VRT_CTX, const struct vdp *filter)
VRT_RemoveFilter(ctx, NULL, filter);
}
-static const struct vfilter vfilter_error[1];
+static const struct vfilter vfilter_error[1] = {{0}};
// XXX: idea(fgs): Allow filters (...) arguments in the list
static const struct vfilter *
diff --git a/vmod/vmod_debug.c b/vmod/vmod_debug.c
index 259497f8d..7e399f7b7 100644
--- a/vmod/vmod_debug.c
+++ b/vmod/vmod_debug.c
@@ -67,8 +67,8 @@ static pthread_mutex_t vsc_mtx = PTHREAD_MUTEX_INITIALIZER;
static struct vsc_seg *vsc_seg = NULL;
static struct VSC_debug *vsc = NULL;
static int loads;
-static const int store_ip_token;
-static const int fail_task_fini_token;
+static const int store_ip_token = 0;
+static const int fail_task_fini_token = 0;
extern void mylog(struct vsl_log *vsl, enum VSL_tag_e tag,
const char *fmt, ...) v_printflike_(3,4);
More information about the varnish-commit
mailing list