From: Ulya Trofimovich Date: Sat, 13 Jul 2019 10:37:11 +0000 (+0100) Subject: Fixed Clang warning -Wconditional-uninitialized. X-Git-Tag: 1.2~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71638e1fad7b401be624584d7833688d3e12cc62;p=re2c Fixed Clang warning -Wconditional-uninitialized. --- diff --git a/lib/bench.cc b/lib/bench.cc index 4d1511ab..bfea2cbe 100644 --- a/lib/bench.cc +++ b/lib/bench.cc @@ -63,7 +63,7 @@ static Result bench_re2c(const char *regexp, std::vector &strings regex_t re; int err; - clock_t /*t1, t2,*/ t3, t4; + clock_t /*t1 = 0, t2 = 0,*/ t3 = 0, t4 = 0; //t1 = clock(); err = regcomp(&re, regexp, flags); @@ -112,7 +112,7 @@ static Result bench_re2(const char *regexp, std::vector &strings } RE2 *re2; - clock_t /*t1, t2,*/ t3, t4; + clock_t /*t1 = 0, t2 = 0,*/ t3 = 0, t4 = 0; bool ok = true; //t1 = clock(); diff --git a/src/skeleton/generate_data.cc b/src/skeleton/generate_data.cc index fdff5d73..dcc08da6 100644 --- a/src/skeleton/generate_data.cc +++ b/src/skeleton/generate_data.cc @@ -338,7 +338,7 @@ template static void gencover( arc = node.arcs.begin(), end = node.arcs.end(); const suffix_t *min_sfx = NULL; - size_t min_idx; + size_t min_idx = 0; // pick the shortest suffix to minimize cover size // handle all child states before setting this state's suffix