From 664fca556669b3dc9904b628b88d9fc01aff495d Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 9 Jun 2016 17:34:14 +0200 Subject: [PATCH] Initialize correctly SystemcallPrivate in constructor It seems that Error is the best possibility when nothing has been done yet. Found by Coverity --- src/support/Systemcall.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp index a2f6a6f868..5dd4a94e16 100644 --- a/src/support/Systemcall.cpp +++ b/src/support/Systemcall.cpp @@ -295,16 +295,10 @@ int Systemcall::startscript(Starttype how, string const & what, } -SystemcallPrivate::SystemcallPrivate(std::string const & sf, - std::string const & of, - std::string const & ef) : - process_(new QProcess), - out_index_(0), - err_index_(0), - in_file_(sf), - out_file_(of), - err_file_(ef), - process_events_(false) +SystemcallPrivate::SystemcallPrivate(std::string const & sf, std::string const & of, + std::string const & ef) + : state(Error), process_(new QProcess), out_index_(0), err_index_(0), + in_file_(sf), out_file_(of), err_file_(ef), process_events_(false) { if (!in_file_.empty()) process_->setStandardInputFile(QString::fromLocal8Bit(in_file_.c_str()));