------- You are receiving this mail because: -------
You are on the CC list for the bug.
http://bugs.exim.org/show_bug.cgi?id=1460
Summary: C++ compile warnings
Product: PCRE
Version: 8.35
Platform: All
OS/Version: Linux
Status: NEW
Severity: bug
Priority: medium
Component: Code
AssignedTo: ph10@???
ReportedBy: dpa-bugs-exim@???
CC: pcre-dev@???
Compiling PCRE 8.35 with C++ (gcc 4.8.3 20140227 (prerelease)) produces
following compiler warning:
CXX libpcrecpp_la-pcrecpp.lo
pcrecpp.cc: In member function ‘int pcrecpp::RE::TryMatch(const
pcrecpp::StringPiece&, int, pcrecpp::RE::Anchor, bool, int*, int) const’:
pcrecpp.cc:514:41: warning: missing initializer for member
‘pcre_extra::mark’ [-Wmissing-field-initializers]
pcre_extra extra = { 0, 0, 0, 0, 0, 0 };
^
pcrecpp.cc:514:41: warning: missing initializer for member
‘pcre_extra::executable_jit’ [-Wmissing-field-initializers]
pcrecpp.cc: At global scope:
pcrecpp.cc:662:6: warning: unused parameter ‘str’ [-Wunused-parameter]
bool Arg::parse_null(const char* str, int n, void* dest) {
^
pcrecpp.cc:662:6: warning: unused parameter ‘n’ [-Wunused-parameter]
CXX pcre_scanner_unittest-pcre_scanner_unittest.o
pcre_scanner_unittest.cc:151:5: warning: unused parameter ‘argc’
[-Wunused-parameter]
int main(int argc, char** argv) {
^
pcre_scanner_unittest.cc:151:5: warning: unused parameter ‘argv’
[-Wunused-parameter]
CXX pcre_stringpiece_unittest-pcre_stringpiece_unittest.o
pcre_stringpiece_unittest.cc:144:5: warning: unused parameter ‘argc’
[-Wunused-parameter]
int main(int argc, char** argv) {
^
pcre_stringpiece_unittest.cc:144:5: warning: unused parameter ‘argv’
[-Wunused-parameter]
To avoid the unused parameter warnings, you can write within the funcktion
(void)argc; (void)argv;
and likewise, for the other places
--
Configure bugmail:
http://bugs.exim.org/userprefs.cgi?tab=email