pombreda / re2

Automatically exported from code.google.com/p/re2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Wrong type in return expression near dfa.cc:1737 #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Return type of function is bool but return statement returning NULL. NULL may 
not have been a defined as a void pointer expression for whomever made the 
edit, possibly because they were using a newer version of GCC.

Compare

g++41 -o obj/re2/dfa.o -Wall -O3 -g -pthread -fno-exceptions  -Wno-sign-compare 
-c -I.    -DNDEBUG re2/dfa.cc
re2/dfa.cc: In member function 'bool re2::DFA::Search(const re2::StringPiece&, 
const re2::StringPiece&, bool, bool, bool, bool*, const char**, 
std::vector<int, std::allocator<int> >*)':
re2/dfa.cc:1737: warning: converting to non-pointer type 'bool' from NULL

with

g++46 -o obj/re2/dfa.o -Wall -O3 -g -pthread -fno-exceptions  -Wno-sign-compare 
-c -I.    -DNDEBUG re2/dfa.cc

Original issue reported on code.google.com by will...@xeraradio.com on 5 Aug 2011 at 12:50

GoogleCodeExporter commented 9 years ago

Original comment by rsc@golang.org on 10 Jan 2014 at 1:13