[glom] Initialize some variables.



commit b3bff53b35df0b2a083db173bb129cc053341b1e
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 15 13:42:51 2016 +0100

    Initialize some variables.
    
    Found by IntelliJ CLion inspections.

 glom/libglom/spawn_with_feedback.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glom/libglom/spawn_with_feedback.cc b/glom/libglom/spawn_with_feedback.cc
index 7ec4783..839570c 100644
--- a/glom/libglom/spawn_with_feedback.cc
+++ b/glom/libglom/spawn_with_feedback.cc
@@ -189,8 +189,8 @@ public:
     try
     {
       std::vector<std::string> arguments = Glib::shell_parse_argv(command_line);
-      int child_stdout;
-      int child_stderr;
+      int child_stdout = 0;
+      int child_stderr = 0;
       Glib::spawn_async_with_pipes(Glib::get_current_dir(), arguments, Glib::SPAWN_DO_NOT_REAP_CHILD, 
sigc::slot<void>(), &pid, 0, (redirect & REDIRECT_STDOUT) ? &child_stdout : 0, (redirect & REDIRECT_STDERR) ? 
&child_stderr : 0);
       if(redirect & REDIRECT_STDOUT)
         redirect_to_string(child_stdout, stdout_text);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]