From 2d9c37a895c11d921eb1527559059727895d9fc1 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 23 Jan 2013 07:29:15 +0000 Subject: [PATCH] win32.c: missing initialization * win32/win32.c (rb_w32_spawn, rb_w32_aspawn_flags): fix missing initialization. pointed out by phasis68 (Heesob Park) at [ruby-core:51579]. [Bug #7721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ win32/win32.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1dba9d5846..74607fbc88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Jan 23 16:29:09 2013 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_spawn, rb_w32_aspawn_flags): fix missing + initialization. pointed out by phasis68 (Heesob Park) at + [ruby-core:51579]. [Bug #7721] + Wed Jan 23 16:18:04 2013 Nobuyoshi Nakada * lib/mkmf.rb (MakeMakefile#try_constant): fix for large unsigned. diff --git a/win32/win32.c b/win32/win32.c index 8b577eaf84..984e03b0dd 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1184,7 +1184,7 @@ rb_w32_spawn(int mode, const char *cmd, const char *prog) const char *shell = NULL; WCHAR *wcmd = NULL, *wshell = NULL; int e = 0; - rb_pid_t ret; + rb_pid_t ret = -1; VALUE v = 0; VALUE v2 = 0; @@ -1293,7 +1293,7 @@ rb_w32_aspawn_flags(int mode, const char *prog, char *const *argv, DWORD flags) char *cmd, fbuf[MAXPATHLEN]; WCHAR *wcmd = NULL, *wprog = NULL; int e = 0; - rb_pid_t ret; + rb_pid_t ret = -1; VALUE v = 0; if (check_spawn_mode(mode)) return -1;