diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-01-18 09:39:54 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2022-01-18 09:39:54 +0900 |
commit | 113c9265ae0d7ad6ed660ab9fa6527e2adc0afee (patch) | |
tree | 9966ebe9d88ab7240f4fe1a82268ba9ad8e48a91 | |
parent | 679af9a5bc5af8e7a5796897618ea629bf5393cb (diff) | |
download | re2-113c9265ae0d7ad6ed660ab9fa6527e2adc0afee.tar.gz re2-113c9265ae0d7ad6ed660ab9fa6527e2adc0afee.tar.bz2 re2-113c9265ae0d7ad6ed660ab9fa6527e2adc0afee.zip |
Fix shadow build errorsubmit/tizen/20220118.043547accepted/tizen/unified/20220118.123155backup/re2-20201101-20220210
Change-Id: If1c4908f77fe380f542edb805a17b2f063ad15c6
-rw-r--r-- | packaging/fix_shadow_error.patch | 150 | ||||
-rw-r--r-- | packaging/re2.spec | 2 |
2 files changed, 152 insertions, 0 deletions
diff --git a/packaging/fix_shadow_error.patch b/packaging/fix_shadow_error.patch new file mode 100644 index 0000000..8f6bdff --- /dev/null +++ b/packaging/fix_shadow_error.patch @@ -0,0 +1,150 @@ +diff --git a/re2/compile.cc b/re2/compile.cc +index 7a9de07..907dc5e 100644 +--- a/re2/compile.cc ++++ b/re2/compile.cc +@@ -81,7 +81,7 @@ struct Frag { + PatchList end; + + Frag() : begin(0) { end.head = 0; } // needed so Frag can go in vector +- Frag(uint32_t begin, PatchList end) : begin(begin), end(end) {} ++ Frag(uint32_t begin_i, PatchList end_i) : begin(begin_i), end(end_i) {} + }; + + // Input encodings. +diff --git a/re2/dfa.cc b/re2/dfa.cc +index 3f6571d..cdab72a 100644 +--- a/re2/dfa.cc ++++ b/re2/dfa.cc +@@ -231,16 +231,16 @@ class DFA { + + // Search parameters + struct SearchParams { +- SearchParams(const StringPiece& text, const StringPiece& context, +- RWLocker* cache_lock) +- : text(text), +- context(context), ++ SearchParams(const StringPiece& text_i, const StringPiece& context_i, ++ RWLocker* cache_lock_i) ++ : text(text_i), ++ context(context_i), + anchored(false), + can_prefix_accel(false), + want_earliest_match(false), + run_forward(false), + start(NULL), +- cache_lock(cache_lock), ++ cache_lock(cache_lock_i), + failed(false), + ep(NULL), + matches(NULL) {} +diff --git a/re2/onepass.cc b/re2/onepass.cc +index 66a62d9..e74d835 100644 +--- a/re2/onepass.cc ++++ b/re2/onepass.cc +@@ -421,8 +421,8 @@ bool Prog::IsOnePass() { + int nalloc = 1; + nodes.insert(nodes.end(), statesize, 0); + for (Instq::iterator it = tovisit.begin(); it != tovisit.end(); ++it) { +- int id = *it; +- int nodeindex = nodebyid[id]; ++ int vid = *it; ++ int nodeindex = nodebyid[vid]; + OneState* node = IndexToNode(nodes.data(), statesize, nodeindex); + + // Flood graph using manual stack, filling in actions as found. +@@ -434,7 +434,7 @@ bool Prog::IsOnePass() { + workq.clear(); + bool matched = false; + int nstack = 0; +- stack[nstack].id = id; ++ stack[nstack].id = vid; + stack[nstack++].cond = 0; + while (nstack > 0) { + int id = stack[--nstack].id; +diff --git a/re2/parse.cc b/re2/parse.cc +index 3bba613..2270404 100644 +--- a/re2/parse.cc ++++ b/re2/parse.cc +@@ -875,10 +875,10 @@ void Regexp::RemoveLeadingString(Regexp* re, int n) { + // factoring that might have subsequently been performed on them. For a merged + // character class, there are no suffixes, of course, so the field is ignored. + struct Splice { +- Splice(Regexp* prefix, Regexp** sub, int nsub) +- : prefix(prefix), +- sub(sub), +- nsub(nsub), ++ Splice(Regexp* prefix_i, Regexp** sub_i, int nsub_i) ++ : prefix(prefix_i), ++ sub(sub_i), ++ nsub(nsub_i), + nsuffix(-1) {} + + Regexp* prefix; +@@ -892,9 +892,9 @@ struct Splice { + // of factoring; any Splices computed; and, for a factored prefix, an iterator + // to the next Splice to be factored (i.e. in another Frame) because suffixes. + struct Frame { +- Frame(Regexp** sub, int nsub) +- : sub(sub), +- nsub(nsub), ++ Frame(Regexp** sub_i, int nsub_i) ++ : sub(sub_i), ++ nsub(nsub_i), + round(0) {} + + Regexp** sub; +@@ -930,9 +930,9 @@ class FactorAlternationImpl { + // Rewrites sub to contain simplified list to alternate and returns + // the new length of sub. Adjusts reference counts accordingly + // (incoming sub[i] decremented, outgoing sub[i] incremented). +-int Regexp::FactorAlternation(Regexp** sub, int nsub, ParseFlags flags) { ++int Regexp::FactorAlternation(Regexp** sub_i, int nsub_i, ParseFlags flags) { + std::vector<Frame> stk; +- stk.emplace_back(sub, nsub); ++ stk.emplace_back(sub_i, nsub_i); + + for (;;) { + auto& sub = stk.back().sub; +diff --git a/re2/prefilter_tree.cc b/re2/prefilter_tree.cc +index fdf4e08..a6d4c83 100644 +--- a/re2/prefilter_tree.cc ++++ b/re2/prefilter_tree.cc +@@ -336,10 +336,10 @@ void PrefilterTree::PropagateMatch(const std::vector<int>& atom_ids, + regexps->set(entry.regexps[i], 1); + int c; + // Pass trigger up to parents. +- for (StdIntMap::iterator it = entry.parents->begin(); +- it != entry.parents->end(); +- ++it) { +- int j = it->first; ++ for (StdIntMap::iterator it1 = entry.parents->begin(); ++ it1 != entry.parents->end(); ++ ++it1) { ++ int j = it1->first; + const Entry& parent = entries_[j]; + // Delay until all the children have succeeded. + if (parent.propagate_up_at_count > 1) { +diff --git a/re2/walker-inl.h b/re2/walker-inl.h +index 8e0f946..89013ac 100644 +--- a/re2/walker-inl.h ++++ b/re2/walker-inl.h +@@ -119,8 +119,8 @@ template<typename T> T Regexp::Walker<T>::Copy(T arg) { + + // State about a single level in the traversal. + template<typename T> struct WalkState { +- WalkState(Regexp* re, T parent) +- : re(re), ++ WalkState(Regexp* re_i, T parent) ++ : re(re_i), + n(-1), + parent_arg(parent), + child_args(NULL) { } +@@ -169,7 +169,7 @@ template<typename T> T Regexp::Walker<T>::WalkInternal(Regexp* re, T top_arg, + for (;;) { + T t; + s = &stack_.top(); +- Regexp* re = s->re; ++ re = s->re; + switch (s->n) { + case -1: { + if (--max_visits_ < 0) { diff --git a/packaging/re2.spec b/packaging/re2.spec index 7cfecf6..5f16c64 100644 --- a/packaging/re2.spec +++ b/packaging/re2.spec @@ -21,6 +21,7 @@ Summary: An efficient, principled regular expression library Url: http://code.google.com/p/re2/ Group: System/Libraries Source: re2-%{version}.tgz +Source1: fix_shadow_error.patch Source1001: %{name}.manifest BuildRequires: gcc-c++ @@ -56,6 +57,7 @@ Python. It is a C++ library. %prep %setup -q -n re2 cp %{SOURCE1001} . +%{__patch} -p1 < %{SOURCE1} %build make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS -Wall -pthread" libdir=%{_libdir} prefix=%{_prefix} |