]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
redundantInitialization
authorgtsoul-tech <gtsoulkanakis@gmail.com>
Wed, 24 Apr 2024 09:40:55 +0000 (12:40 +0300)
committergtsoul-tech <gtsoulkanakis@gmail.com>
Wed, 24 Apr 2024 09:40:55 +0000 (12:40 +0300)
src/nfa/limex_compile.cpp
src/nfa/mpv.c
src/nfagraph/ng_anchored_dots.cpp

index f84cdc32fccd7d998a5ba7d501a33bd079145e03..2ec65552def40c9ada02af33edd0392ba4cb8ed3 100644 (file)
@@ -1572,7 +1572,7 @@ u32 findMaxVarShift(const build_info &args, u32 nShifts) {
 static
 int getLimexScore(const build_info &args, u32 nShifts) {
     const NGHolder &h = args.h;
-    u32 maxVarShift = nShifts;
+    u32 maxVarShift;
     int score = 0;
 
     score += SHIFT_COST * nShifts;
index cba3d159ee9417337102023d70d7c7c5984ecf55..2b1b5c5f32fc7cf0c95816b7541983b31b03c0e4 100644 (file)
@@ -512,7 +512,7 @@ size_t find_last_bad(const struct mpv_kilopuff *kp, const u8 *buf,
 
     verm_restart:;
         assert(buf[curr] == kp->u.verm.c);
-        size_t test = curr;
+        size_t test;
         if (curr + min_rep < length) {
             test = curr + min_rep;
         } else {
@@ -534,7 +534,7 @@ size_t find_last_bad(const struct mpv_kilopuff *kp, const u8 *buf,
         m128 hi = kp->u.shuf.mask_hi;
     shuf_restart:
         assert(do_single_shufti(lo, hi, buf[curr]));
-        size_t test = curr;
+        size_t test;
         if (curr + min_rep < length) {
             test = curr + min_rep;
         } else {
@@ -556,7 +556,7 @@ size_t find_last_bad(const struct mpv_kilopuff *kp, const u8 *buf,
         const m128 mask1 = kp->u.truffle.mask1;
         const m128 mask2 = kp->u.truffle.mask2;
     truffle_restart:;
-        size_t test = curr;
+        size_t test;
         if (curr + min_rep < length) {
             test = curr + min_rep;
         } else {
@@ -582,7 +582,7 @@ size_t find_last_bad(const struct mpv_kilopuff *kp, const u8 *buf,
 
     nverm_restart:;
         assert(buf[curr] != kp->u.verm.c);
-        size_t test = curr;
+        size_t test;
         if (curr + min_rep < length) {
             test = curr + min_rep;
         } else {
index 9a13376d19354255464ce7c4d1d0c42e20b70713..8286d816af4f7641310f376f06c5a9eab3d38de8 100644 (file)
@@ -165,9 +165,9 @@ void reformAnchoredRepeatsComponent(NGHolder &g,
         return;
     }
 
-    NFAVertex dotV = NGHolder::null_vertex();
+    
     set<NFAVertex> otherV;
-    dotV = findReformable(g, compAnchoredStarts, otherV);
+    NFAVertex dotV = findReformable(g, compAnchoredStarts, otherV);
     if (dotV == NGHolder::null_vertex()) {
         DEBUG_PRINTF("no candidate reformable dot found.\n");
         return;
@@ -268,9 +268,9 @@ void reformUnanchoredRepeatsComponent(NGHolder &g,
     }
 
     while (true) {
-        NFAVertex dotV = NGHolder::null_vertex();
+        
         set<NFAVertex> otherV;
-        dotV = findReformable(g, compUnanchoredStarts, otherV);
+        NFAVertex dotV = findReformable(g, compUnanchoredStarts, otherV);
         if (dotV == NGHolder::null_vertex()) {
             DEBUG_PRINTF("no candidate reformable dot found.\n");
             return;