mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
deadcode.DeadStores
This commit is contained in:
parent
faa9e7549f
commit
de1697b467
@ -134,7 +134,6 @@ u16 doWide16(const char *wide_entry, const u8 **c_inout, const u8 *end,
|
|||||||
len_c -= 16;
|
len_c -= 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = 0;
|
|
||||||
// at least one in (0, 16).
|
// at least one in (0, 16).
|
||||||
u32 loadLength_w = MIN(len_w, 16);
|
u32 loadLength_w = MIN(len_w, 16);
|
||||||
u32 loadLength_c = MIN(len_c, 16);
|
u32 loadLength_c = MIN(len_c, 16);
|
||||||
|
@ -67,7 +67,7 @@ char SHENG_IMPL(u8 *state, NfaCallback cb, void *ctxt, const struct sheng *s,
|
|||||||
|
|
||||||
if (unlikely(ACCEPT_FUNC(tmp))) {
|
if (unlikely(ACCEPT_FUNC(tmp))) {
|
||||||
DEBUG_PRINTF("Accept state %u reached\n", tmp & SHENG_STATE_MASK);
|
DEBUG_PRINTF("Accept state %u reached\n", tmp & SHENG_STATE_MASK);
|
||||||
u64a match_offset = base_offset + (cur_buf - buf) + 1;
|
u64a match_offset = base_offset + (cur_buf - buf) + 1; //NOLINT (clang-analyzer-deadcode.DeadStores)
|
||||||
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
||||||
if (STOP_AT_MATCH) {
|
if (STOP_AT_MATCH) {
|
||||||
DEBUG_PRINTF("Stopping at match @ %lli\n",
|
DEBUG_PRINTF("Stopping at match @ %lli\n",
|
||||||
|
@ -129,7 +129,7 @@ char SHENG_IMPL(u8 *state, NfaCallback cb, void *ctxt, const struct sheng *s,
|
|||||||
|
|
||||||
if (unlikely(INTERESTING_FUNC(a1, a2, a3, a4))) {
|
if (unlikely(INTERESTING_FUNC(a1, a2, a3, a4))) {
|
||||||
if (ACCEPT_FUNC(a1)) {
|
if (ACCEPT_FUNC(a1)) {
|
||||||
u64a match_offset = base_offset + b1 - buf;
|
u64a match_offset = base_offset + b1 - buf; //NOLINT (clang-analyzer-deadcode.DeadStores)
|
||||||
DEBUG_PRINTF("Accept state %u reached\n",
|
DEBUG_PRINTF("Accept state %u reached\n",
|
||||||
a1 & SHENG_STATE_MASK);
|
a1 & SHENG_STATE_MASK);
|
||||||
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
||||||
@ -154,7 +154,7 @@ char SHENG_IMPL(u8 *state, NfaCallback cb, void *ctxt, const struct sheng *s,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ACCEPT_FUNC(a2)) {
|
if (ACCEPT_FUNC(a2)) {
|
||||||
u64a match_offset = base_offset + b2 - buf;
|
u64a match_offset = base_offset + b2 - buf; //NOLINT (clang-analyzer-deadcode.DeadStores)
|
||||||
DEBUG_PRINTF("Accept state %u reached\n",
|
DEBUG_PRINTF("Accept state %u reached\n",
|
||||||
a2 & SHENG_STATE_MASK);
|
a2 & SHENG_STATE_MASK);
|
||||||
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
||||||
@ -179,7 +179,7 @@ char SHENG_IMPL(u8 *state, NfaCallback cb, void *ctxt, const struct sheng *s,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ACCEPT_FUNC(a3)) {
|
if (ACCEPT_FUNC(a3)) {
|
||||||
u64a match_offset = base_offset + b3 - buf;
|
u64a match_offset = base_offset + b3 - buf; //NOLINT (clang-analyzer-deadcode.DeadStores)
|
||||||
DEBUG_PRINTF("Accept state %u reached\n",
|
DEBUG_PRINTF("Accept state %u reached\n",
|
||||||
a3 & SHENG_STATE_MASK);
|
a3 & SHENG_STATE_MASK);
|
||||||
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
||||||
@ -204,7 +204,7 @@ char SHENG_IMPL(u8 *state, NfaCallback cb, void *ctxt, const struct sheng *s,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ACCEPT_FUNC(a4)) {
|
if (ACCEPT_FUNC(a4)) {
|
||||||
u64a match_offset = base_offset + b4 - buf;
|
u64a match_offset = base_offset + b4 - buf; //NOLINT (clang-analyzer-deadcode.DeadStores)
|
||||||
DEBUG_PRINTF("Accept state %u reached\n",
|
DEBUG_PRINTF("Accept state %u reached\n",
|
||||||
a4 & SHENG_STATE_MASK);
|
a4 & SHENG_STATE_MASK);
|
||||||
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
DEBUG_PRINTF("Match @ %llu\n", match_offset);
|
||||||
|
@ -2991,7 +2991,7 @@ hwlmcb_rv_t roseRunProgram(const struct RoseEngine *t,
|
|||||||
|
|
||||||
pc = getByOffset(t, ri->child_offset);
|
pc = getByOffset(t, ri->child_offset);
|
||||||
pc_base = pc;
|
pc_base = pc;
|
||||||
programOffset = (const u8 *)pc_base -(const u8 *)t;
|
programOffset = (const u8 *)pc_base -(const u8 *)t; //NOLINT (clang-analyzer-deadcode.DeadStores)
|
||||||
DEBUG_PRINTF("pc_base %p pc %p child_offset %u squash %u\n",
|
DEBUG_PRINTF("pc_base %p pc %p child_offset %u squash %u\n",
|
||||||
pc_base, pc, ri->child_offset, ri->squash);
|
pc_base, pc, ri->child_offset, ri->squash);
|
||||||
work_done = 0;
|
work_done = 0;
|
||||||
@ -3428,7 +3428,7 @@ hwlmcb_rv_t roseRunProgram_l(const struct RoseEngine *t,
|
|||||||
|
|
||||||
pc = getByOffset(t, ri->child_offset);
|
pc = getByOffset(t, ri->child_offset);
|
||||||
pc_base = pc;
|
pc_base = pc;
|
||||||
programOffset = (const u8 *)pc_base -(const u8 *)t;
|
programOffset = (const u8 *)pc_base -(const u8 *)t; //NOLINT (clang-analyzer-deadcode.DeadStores)
|
||||||
DEBUG_PRINTF("pc_base %p pc %p child_offset %u squash %u\n",
|
DEBUG_PRINTF("pc_base %p pc %p child_offset %u squash %u\n",
|
||||||
pc_base, pc, ri->child_offset, ri->squash);
|
pc_base, pc, ri->child_offset, ri->squash);
|
||||||
work_done = 0;
|
work_done = 0;
|
||||||
|
@ -89,7 +89,7 @@ ostream& operator<<(ostream &os, const hs_expr_ext &ext) {
|
|||||||
os << ", ";
|
os << ", ";
|
||||||
}
|
}
|
||||||
os << "hamming_distance=" << ext.hamming_distance;
|
os << "hamming_distance=" << ext.hamming_distance;
|
||||||
first = false;
|
//first = false;
|
||||||
}
|
}
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
@ -571,7 +571,7 @@ TEST_P(HyperscanTestMatchTerminate, StreamWhole) {
|
|||||||
terminateHandler, &count);
|
terminateHandler, &count);
|
||||||
ASSERT_TRUE(err == HS_SUCCESS || err == HS_SCAN_TERMINATED);
|
ASSERT_TRUE(err == HS_SUCCESS || err == HS_SCAN_TERMINATED);
|
||||||
|
|
||||||
err = hs_close_stream(stream, scratch, terminateHandler, &count);
|
hs_close_stream(stream, scratch, terminateHandler, &count);
|
||||||
ASSERT_EQ(1, count) << "Number of matches returned was not 1.";
|
ASSERT_EQ(1, count) << "Number of matches returned was not 1.";
|
||||||
|
|
||||||
err = hs_free_scratch(scratch);
|
err = hs_free_scratch(scratch);
|
||||||
@ -600,7 +600,7 @@ TEST_P(HyperscanTestMatchTerminate, StreamByteByByte) {
|
|||||||
ASSERT_TRUE(err == HS_SUCCESS || err == HS_SCAN_TERMINATED);
|
ASSERT_TRUE(err == HS_SUCCESS || err == HS_SCAN_TERMINATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
err = hs_close_stream(stream, scratch, terminateHandler, &count);
|
hs_close_stream(stream, scratch, terminateHandler, &count);
|
||||||
ASSERT_EQ(1, count) << "Number of matches returned was not 1.";
|
ASSERT_EQ(1, count) << "Number of matches returned was not 1.";
|
||||||
|
|
||||||
err = hs_free_scratch(scratch);
|
err = hs_free_scratch(scratch);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user