From 98e18a65f0cd954006297d15736950493a112e2f Mon Sep 17 00:00:00 2001 From: Serguei Makarov Date: Fri, 26 Jul 2013 15:35:47 -0400 Subject: [PATCH] stapregex -- placate the gods of coverity (UNINIT_CTOR) --- session.cxx | 1 + stapregex-dfa.cxx | 2 +- stapregex-parse.cxx | 5 +++-- stapregex-parse.h | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/session.cxx b/session.cxx index e23a4f9f8..0a15b9fa2 100644 --- a/session.cxx +++ b/session.cxx @@ -248,6 +248,7 @@ systemtap_session::systemtap_session (const systemtap_session& other, pattern_root(new match_node), user_file (other.user_file), dfa_counter(0), + need_tagged_dfa(other.need_tagged_dfa), be_derived_probes(0), dwarf_derived_probes(0), kprobe_derived_probes(0), diff --git a/stapregex-dfa.cxx b/stapregex-dfa.cxx index 7d5ddddcc..0e5deb2d9 100644 --- a/stapregex-dfa.cxx +++ b/stapregex-dfa.cxx @@ -149,7 +149,7 @@ arc_compare (const arc_priority& a, const arc_priority& b) /* Manage the linked list of states in a DFA: */ state::state (state_kernel *kernel) - : next(NULL), kernel(kernel), accepts(false), accept_outcome(0) {} + : label(~0), next(NULL), kernel(kernel), accepts(false), accept_outcome(0) {} state * dfa::add_state (state *s) diff --git a/stapregex-parse.cxx b/stapregex-parse.cxx index d1eddc9a2..cca248878 100644 --- a/stapregex-parse.cxx +++ b/stapregex-parse.cxx @@ -145,10 +145,11 @@ void print_escaped(std::ostream& o, char c) // ------------------------------------------------------------------------ -cursor::cursor() : input(NULL), pos(~0) {} +cursor::cursor() : input(NULL), pos(~0), + last_pos(~0), next_c(0), last_c(0) {} cursor::cursor(const std::string *input, bool do_unescape) - : input(input), do_unescape(do_unescape), pos(0) + : input(input), do_unescape(do_unescape), pos(0), last_pos(0) { next_c = 0; last_c = 0; finished = ( pos >= input->length() ); diff --git a/stapregex-parse.h b/stapregex-parse.h index 69a3e94e3..1d91b6f68 100644 --- a/stapregex-parse.h +++ b/stapregex-parse.h @@ -48,7 +48,8 @@ private: class regex_parser { public: regex_parser (const std::string& input, bool do_unescape = true) - : input(input), do_unescape(do_unescape) {} + : input(input), do_unescape(do_unescape), + do_tag(false), num_tags(~0) {} regexp *parse (bool do_tag = true); private: -- 2.43.5