| Index: third_party/re2/re2/compile.cc
|
| diff --git a/third_party/re2/re2/compile.cc b/third_party/re2/re2/compile.cc
|
| index 0c96d3395522afc9ec98c7882f428280e0fa6cf2..adb45fddbfdcda8e2198caddb83b2c4e3a41b26c 100644
|
| --- a/third_party/re2/re2/compile.cc
|
| +++ b/third_party/re2/re2/compile.cc
|
| @@ -44,7 +44,7 @@ struct PatchList {
|
| static PatchList Append(Prog::Inst *inst0, PatchList l1, PatchList l2);
|
| };
|
|
|
| -static PatchList nullPatchList = { 0 };
|
| +static PatchList nullPatchList;
|
|
|
| // Returns patch list containing just p.
|
| PatchList PatchList::Mk(uint32 p) {
|
| @@ -106,11 +106,12 @@ struct Frag {
|
| uint32 begin;
|
| PatchList end;
|
|
|
| + explicit Frag(LinkerInitialized) {}
|
| Frag() : begin(0) { end.p = 0; } // needed so Frag can go in vector
|
| Frag(uint32 begin, PatchList end) : begin(begin), end(end) {}
|
| };
|
|
|
| -static Frag kNullFrag;
|
| +static Frag kNullFrag(LINKER_INITIALIZED);
|
|
|
| // Input encodings.
|
| enum Encoding {
|
| @@ -588,7 +589,7 @@ static struct ByteRangeProg {
|
| };
|
|
|
| void Compiler::Add_80_10ffff() {
|
| - int inst[arraysize(prog_80_10ffff)];
|
| + int inst[arraysize(prog_80_10ffff)] = { 0 }; // does not need to be initialized; silences gcc warning
|
| for (int i = 0; i < arraysize(prog_80_10ffff); i++) {
|
| const ByteRangeProg& p = prog_80_10ffff[i];
|
| int next = 0;
|
| @@ -732,7 +733,7 @@ Frag Compiler::PostVisit(Regexp* re, Frag, Frag, Frag* child_frags,
|
| Frag f = Match(re->match_id());
|
| // Remember unanchored match to end of string.
|
| if (anchor_ != RE2::ANCHOR_BOTH)
|
| - f = Cat(DotStar(), f);
|
| + f = Cat(DotStar(), Cat(EmptyWidth(kEmptyEndText), f));
|
| return f;
|
| }
|
|
|
|
|