diff --git a/src/nfagraph/ng_literal_analysis.cpp b/src/nfagraph/ng_literal_analysis.cpp index ea0def02..d25ac43e 100644 --- a/src/nfagraph/ng_literal_analysis.cpp +++ b/src/nfagraph/ng_literal_analysis.cpp @@ -69,14 +69,14 @@ struct LitGraphVertexProps { LitGraphVertexProps() = default; explicit LitGraphVertexProps(ue2_literal::elem c_in) : c(move(c_in)) {} ue2_literal::elem c; // string element (char + bool) - size_t index; // managed by ue2_graph + size_t index = 0; // managed by ue2_graph }; struct LitGraphEdgeProps { LitGraphEdgeProps() = default; explicit LitGraphEdgeProps(u64a score_in) : score(score_in) {} u64a score = NO_LITERAL_AT_EDGE_SCORE; - size_t index; // managed by ue2_graph + size_t index = 0; // managed by ue2_graph }; struct LitGraph diff --git a/tools/hsbench/engine_hyperscan.h b/tools/hsbench/engine_hyperscan.h index 253ec9aa..afbdf098 100644 --- a/tools/hsbench/engine_hyperscan.h +++ b/tools/hsbench/engine_hyperscan.h @@ -65,8 +65,8 @@ public: class EngineHSStream : public EngineStream { public: ~EngineHSStream(); - hs_stream_t *id; - EngineHSContext *ctx; + hs_stream_t *id = nullptr; + EngineHSContext *ctx = nullptr; }; /** Hyperscan Engine for scanning data. */ diff --git a/tools/hsbench/engine_pcre.h b/tools/hsbench/engine_pcre.h index d121581f..9569bef4 100644 --- a/tools/hsbench/engine_pcre.h +++ b/tools/hsbench/engine_pcre.h @@ -62,7 +62,7 @@ public: struct PcreDB { bool highlander = false; bool utf8 = false; - u32 id; + u32 id = 0; pcre *db = nullptr; pcre_extra *extra = nullptr; }; diff --git a/tools/hsbench/main.cpp b/tools/hsbench/main.cpp index 3349ecc8..1c91813b 100644 --- a/tools/hsbench/main.cpp +++ b/tools/hsbench/main.cpp @@ -877,6 +877,7 @@ void displayCsvResults(const vector> &threads, printf(",\"%0.3f\"", totalSecs); printf(",\"%0.2Lf\"", calc_mbps(totalSecs, totalBytes)); + assert(bytesPerRun); double matchRate = ((double)matchesPerRun * 1024) / bytesPerRun; printf(",\"%llu\"", matchesPerRun); printf(",\"%0.3f\"", matchRate);