Skip Menu |

This queue is for tickets about the re-engine-RE2 CPAN distribution.

Report information
The Basics
Id: 96338
Status: resolved
Priority: 0/
Queue: re-engine-RE2

People
Owner: Nobody in particular
Requestors: bochecha [...] fedoraproject.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: Fix build with -Werror=format-security
Using the gcc option -Werror=format-security, re-engine-RE2 fails to build: re2_xs.cc:174:36: error: format not a string literal and no format arguments [-Werror=format-security] : error.c_str()); ^ The attached patch fixes it.
From: bochecha [...] fedoraproject.org
On Mon Jun 09 04:44:29 2014, http://bochecha.id.fedoraproject.org/ wrote: Show quoted text
> The attached patch fixes it.
Well, here's the patch.
Subject: re-engine-RE2-Fix-build-with-Werror-format-security.patch
From d669869b3517ae8460e80065967e238de8385ed6 Mon Sep 17 00:00:00 2001 From: Mathieu Bridon <bochecha@fedoraproject.org> Date: Mon, 9 Jun 2014 10:05:05 +0200 Subject: [PATCH] Fix build with -Werror=format-security --- re2_xs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/re2_xs.cc b/re2_xs.cc index 74a7586..b31b1b0 100644 --- a/re2_xs.cc +++ b/re2_xs.cc @@ -169,7 +169,7 @@ RE2_comp(pTHX_ const string error = ri->error(); delete ri; - croak(perl_only + croak("%s", perl_only ? "/x is not supported by RE2" : error.c_str()); return NULL; // unreachable -- 1.9.3
On Mon Jun 09 04:44:29 2014, http://bochecha.id.fedoraproject.org/ wrote: Show quoted text
> Using the gcc option -Werror=format-security, re-engine-RE2 fails to > build: > > re2_xs.cc:174:36: error: format not a string literal and no format > arguments [-Werror=format-security] > : error.c_str()); > ^ > > The attached patch fixes it.
Thanks, applied and released.