diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-07 04:47:34 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-07 04:47:34 +0000 |
commit | f61e3d525bda96a29fd1630ae665c7057fc42040 (patch) | |
tree | 30a27778404e43b1acef5126c1e095bcbdc9a32f /ace/Process.cpp | |
parent | 1013a6109d00841649c7241e4dff63394d92038f (diff) | |
download | ATCD-f61e3d525bda96a29fd1630ae665c7057fc42040.tar.gz |
(spawn): initialized local "result" to 0 to avoid egcs warning about
possible unitialized use. Added const to loop index to avoid egcs
warning about discarding const.
Diffstat (limited to 'ace/Process.cpp')
-rw-r--r-- | ace/Process.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ace/Process.cpp b/ace/Process.cpp index 1425c6ca9b6..4d41c8e00e8 100644 --- a/ace/Process.cpp +++ b/ace/Process.cpp @@ -72,7 +72,7 @@ ACE_Process::spawn (ACE_Process_Options &options) if (options.env_argv ()[0] == 0) // command-line args this->child_id_ = ACE_OS::execvp (options.command_line_argv ()[0], - options.command_line_argv ()); + options.command_line_argv ()); else { // Added the new environment variables. @@ -92,7 +92,7 @@ ACE_Process::spawn (ACE_Process_Options &options) result = ACE_OS::execve (options.command_line_argv ()[0], options.command_line_argv (), options.env_argv ()); -#endif +#endif return this->child_id_; #else /* ACE_WIN32 */ @@ -131,7 +131,7 @@ ACE_Process::spawn (ACE_Process_Options &options) ACE_OS::chdir (options.working_directory ()); // Child process executes the command. - int result; + int result = 0; if (options.env_argv ()[0] == 0) // command-line args @@ -146,7 +146,7 @@ ACE_Process::spawn (ACE_Process_Options &options) ACE_NOTSUP_RETURN (-1); #else // Added the new environment variables. - for (char **user_env = options.env_argv (); + for (char *const *user_env = options.env_argv (); *user_env != 0; user_env++) ACE_OS::putenv (*user_env); |