[master] 0c10a6a52 Polish WITH_PERSISTENT_STORAGE use

Nils Goroll nils.goroll at uplex.de
Thu Feb 13 14:52:06 UTC 2025


commit 0c10a6a520f85a8a5e3f3192fa3d06a247c2de4d
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Feb 13 15:38:45 2025 +0100

    Polish WITH_PERSISTENT_STORAGE use
    
    The macro is either defined as 1 or undefined. If undefined, Flexelint
    complained:
    
        Warning 553: Undefined preprocessor variable 'WITH_PERSISTENT_STORAGE',
        assumed 0

diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index c71a6a108..c74292bdb 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -482,7 +482,7 @@ child_main(int sigmagic, size_t altstksz)
 	CLI_AddFuncs(debug_cmds);
 	CLI_AddFuncs(child_cmds);
 
-#if WITH_PERSISTENT_STORAGE
+#ifdef WITH_PERSISTENT_STORAGE
 	/* Wait for persistent storage to load if asked to */
 	if (FEATURE(FEATURE_WAIT_SILO))
 		SMP_Ready();
diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h
index 34a616c8d..12b3dd416 100644
--- a/bin/varnishd/cache/cache_varnishd.h
+++ b/bin/varnishd/cache/cache_varnishd.h
@@ -587,7 +587,7 @@ struct stv_buffer *STV_AllocBuf(struct worker *wrk, const struct stevedore *stv,
 void STV_FreeBuf(struct worker *wrk, struct stv_buffer **pstvbuf);
 void *STV_GetBufPtr(struct stv_buffer *stvbuf, size_t *psize);
 
-#if WITH_PERSISTENT_STORAGE
+#ifdef WITH_PERSISTENT_STORAGE
 /* storage_persistent.c */
 void SMP_Ready(void);
 #endif


More information about the varnish-commit mailing list