From 1180a211e4672994b0f8c7bc57186d11245595ec Mon Sep 17 00:00:00 2001 From: Giovanni Date: Mon, 2 Aug 2021 20:29:20 +0200 Subject: Fix warning when SP_HAS_PCRE2 is not defined (#397) --- src/sp_pcre_compat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 3bd00ca..203fb7a 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c @@ -3,8 +3,10 @@ inline void sp_pcre_free(sp_pcre* regexp) { #ifdef SP_HAS_PCRE2 pcre2_code_free(regexp); + regexp = NULL; +#else + (void)regexp; #endif - regexp = NULL; } sp_pcre* sp_pcre_compile(const char* const pattern) { -- cgit v1.3