[master] 1f5aa959d Appease flexelint

Nils Goroll nils.goroll at uplex.de
Wed Jan 6 10:16:07 UTC 2021


commit 1f5aa959d7aa287854a953dbf09a6ec3286465f6
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Jan 6 11:11:43 2021 +0100

    Appease flexelint
    
    cache/cache_vrt.c  916  Warning 438: Last value assigned to variable
    'berr' (defined at line 849) not used
    
    berr is intentionally NULLed to clarify that no dynamic value must stay
    alive after the BAN_Abandon()
    
    Ref 6eee0074ffd3e3b87c994bcec8a9ec28993000c9

diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index 072f1e745..327a651f1 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -908,6 +908,7 @@ VRT_ban_string(VRT_CTX, VCL_STRING str)
 			err = "Unknown error (workspace overflow)";
 		berr = NULL;
 	}
+	AZ(berr);
 	if (bp != NULL)
 		BAN_Abandon(bp);
 	VAV_Free(av);


More information about the varnish-commit mailing list