]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
unreadVariable 261/head
authorgtsoul-tech <gtsoulkanakis@gmail.com>
Tue, 30 Apr 2024 10:36:39 +0000 (13:36 +0300)
committergtsoul-tech <gtsoulkanakis@gmail.com>
Tue, 30 Apr 2024 10:36:39 +0000 (13:36 +0300)
benchmarks/benchmarks.cpp
src/nfa/castle.c
src/nfa/castlecompile.cpp
src/rose/counting_miracle.h
src/rose/rose_build_add_mask.cpp
unit/internal/multi_bit_compress.cpp
util/cross_compile.cpp

index 3c1a0bab64e1ed68ba3c5ce0cdaa96b9d7bfb35d..1cf31c5f9f16e1ae6d4b5b7d2849f5fe6f19f8f0 100644 (file)
@@ -108,7 +108,7 @@ static void run_benchmarks(int size, int loops, int max_matches,
         u64a total_size = 0;
         auto start = std::chrono::steady_clock::now();
         for (int i = 0; i < loops; i++) {
-            const u8 *res = func(bench);
+            func(bench);
         }
         auto end = std::chrono::steady_clock::now();
         total_sec +=
index 355d79512244e6c0c4bd3fde06efb684d0d6f811..35b202a27141413bc93341e945680fdf95acda3c 100644 (file)
@@ -906,7 +906,6 @@ s64a castleLastKillLoc(const struct Castle *c, struct mq *q) {
         if (castleRevScan(c, q->history, sp + hlen, ep + hlen, &loc)) {
             return (s64a)loc - hlen;
         }
-        ep = 0;
     }
 
     return sp - 1; /* the repeats are never killed */
index 56b12700f32f683cef04c6707b879a67932f0774..bef36451a0a5cc5f4db3e1a6848e187ea3a12bc6 100644 (file)
@@ -655,7 +655,8 @@ buildCastle(const CastleProto &proto,
     if (!stale_iter.empty()) {
         c->staleIterOffset = verify_u32(ptr - base_ptr);
         copy_bytes(ptr, stale_iter);
-        ptr += byte_length(stale_iter);
+        // Removed unused increment operation
+        // ptr += byte_length(stale_iter);
     }
 
     return nfa;
index 602907cb8627d2ab26cc5698a657af939e8c0c3a..3bd93509c77e15dcf764e0c94602bad0ed89b1f2 100644 (file)
@@ -192,7 +192,7 @@ int roseCountingMiracleOccurs(const struct RoseEngine *t,
 
     u32 count = 0;
 
-    s64a m_loc = start;
+    s64a m_loc;
 
     if (!cm->shufti) {
         u8 c = cm->c;
index 7e0e00b08ea460148d12eae5a264ef5d01184d63..6c84c40a897b8f69d91104c19f43a4a644ba8fe5 100644 (file)
@@ -131,7 +131,6 @@ void findMaskLiteral(const vector<CharReach> &mask, bool streaming,
     if (better) {
         best_begin = begin;
         best_end = end;
-        best_len = len;
     }
 
     for (size_t i = best_begin; i < best_end; i++) {
index e0ec475c1e1eefaccfa686d1e46aaf276469e234..dd5b7b7aef522fb8d57c85200e1f966d74e5739a 100644 (file)
@@ -401,7 +401,7 @@ TEST_P(MultiBitCompTest, CompCompressDecompressDense) {
 
 TEST(MultiBitComp, CompIntegration1) {
     // 256 + 1 --> smallest 2-level mmbit
-    u32 total_size = mmbit_size(257);
+    //u32 total_size = mmbit_size(257);
     mmbit_holder ba(257);
 
     //-------------------- 1 -----------------------//
@@ -516,7 +516,7 @@ TEST(MultiBitComp, CompIntegration1) {
 
 TEST(MultiBitComp, CompIntegration2) {
     // 64^2 + 1 --> smallest 3-level mmbit
-    u32 total_size = mmbit_size(4097);
+    //u32 total_size = mmbit_size(4097);
     mmbit_holder ba(4097);
 
     //-------------------- 1 -----------------------//
@@ -645,7 +645,7 @@ TEST(MultiBitComp, CompIntegration2) {
 
 TEST(MultiBitComp, CompIntegration3) {
     // 64^3 + 1 --> smallest 4-level mmbit
-    u32 total_size = mmbit_size(262145);
+    //u32 total_size = mmbit_size(262145);
     mmbit_holder ba(262145);
 
     //-------------------- 1 -----------------------//
index df2aff5a007c0370c5bfe4b2410a91deb27227fd..8ce1e2f00e755f0717d5daebd8c3054230b51feb 100644 (file)
@@ -55,7 +55,7 @@ unique_ptr<hs_platform_info> xcompileReadMode(const char *s) {
     assert(!err);
 
     string str(s);
-    string mode = str.substr(0, str.find(":"));
+    //string mode = str.substr(0, str.find(":"));
     string opt = str.substr(str.find(":")+1, str.npos);
     bool found_mode = false;