Commit 88443894 authored by Geoff Simmons's avatar Geoff Simmons

Add -Wextra to C and C++ compilation, and silence some warnings that

it uncovered.
parent d01683d0
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = @VMOD_INCLUDES@ -Wall -Werror
AM_CPPFLAGS = @VMOD_INCLUDES@ -Wall -Werror -Wextra
CFLAGS += -std=c99
AM_CXXFLAGS = -Wall -Werror -std=c++11 @RE2_CFLAGS@
AM_CXXFLAGS = -Wall -Werror -Wextra -std=c++11 @RE2_CFLAGS@
vmoddir = @VMOD_DIR@
vmod_LTLIBRARIES = libvmod_re2.la
......
......@@ -63,7 +63,7 @@ vre2::match(const char *subject, const size_t len, const int ngroups,
return re_->Match(subject, 0, len, RE2::UNANCHORED, groups, ngroups);
}
inline const int
inline int
vre2::ngroups() const
{
return re_->NumberOfCapturingGroups();
......@@ -130,7 +130,7 @@ vre2_init(vre2 **vre2p, const char *pattern, unsigned utf8,
CATCHALL
}
const size_t
size_t
vre2_matchsz(void)
{
return sizeof(StringPiece);
......
......@@ -47,7 +47,7 @@ public:
virtual ~vre2();
bool match(const char *subject, size_t len, int ngroups,
StringPiece* groups) const;
const int ngroups() const;
int ngroups() const;
int get_group(const char * const name) const;
bool replace(string *text, const char * const rewrite) const;
bool global_replace(string *text, const char * const rewrite) const;
......@@ -76,7 +76,7 @@ extern "C" {
unsigned perl_classes, unsigned word_boundary,
unsigned one_line);
const char *vre2_fini(vre2 **vre2);
const size_t vre2_matchsz(void);
size_t vre2_matchsz(void);
const char *vre2_ngroups(vre2 *vre2, int * const ngroups);
const char *vre2_match(vre2 *vre2, const char * const subject,
size_t len, int * const match, int ngroups,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment