]> granicus.if.org Git - re2c/commitdiff
Fixed Clang warning -Wconditional-uninitialized.
authorUlya Trofimovich <skvadrik@gmail.com>
Sat, 13 Jul 2019 10:37:11 +0000 (11:37 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sat, 13 Jul 2019 10:37:11 +0000 (11:37 +0100)
lib/bench.cc
src/skeleton/generate_data.cc

index 4d1511ab59967e334b259c4088861fb8f21ffe9f..bfea2cbed7f5347f29564fa8ef041f53308ce25b 100644 (file)
@@ -63,7 +63,7 @@ static Result bench_re2c(const char *regexp, std::vector<std::string> &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<std::string> &strings
     }
 
     RE2 *re2;
-    clock_t /*t1, t2,*/ t3, t4;
+    clock_t /*t1 = 0, t2 = 0,*/ t3 = 0, t4 = 0;
     bool ok = true;
 
     //t1 = clock();
index fdff5d73a19c00269e02a16209d7ded11a5b68e0..dcc08da600cde4bfd0203f95feea720d4bef15b9 100644 (file)
@@ -338,7 +338,7 @@ template <typename cunit_t, typename key_t> 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