From b4603dcfad6ee746d007a4b2f2fb735605186044 Mon Sep 17 00:00:00 2001 From: zrj Date: Tue, 9 Aug 2016 13:30:28 +0300 Subject: [PATCH] TRE: Fix const discard issue for all compilers. Mainly to unbreak WORLD_CCVER=gcc47 and avoid use of #pragma diagnostic. --- contrib/tre/lib/regexec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/tre/lib/regexec.c b/contrib/tre/lib/regexec.c index a72bd9680a..135746c2bc 100644 --- a/contrib/tre/lib/regexec.c +++ b/contrib/tre/lib/regexec.c @@ -201,10 +201,7 @@ tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags, i++; } #ifndef TRE_USE_ALLOCA -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" - if (tags != intags) xfree(tags); -#pragma GCC diagnostic pop + if (tags != intags) xfree(__DECONST(tre_tag_t *,tags)); #endif /* !TRE_USE_ALLOCA */ } -- 2.11.4.GIT