From b2d8a7c8fce07109d46b998122aba2b04a843cc6 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 4 Sep 2006 21:48:47 +0000 Subject: * time.c (time_to_s): variable declaration after an execution statement. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- time.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'time.c') diff --git a/time.c b/time.c index 50d537b6c..b85622851 100644 --- a/time.c +++ b/time.c @@ -1256,6 +1256,9 @@ time_to_s(time) time_t off; char buf2[32]; char sign = '+'; +#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) + VALUE tmp; +#endif GetTimeval(time, tobj); if (tobj->tm_got == 0) { @@ -1264,7 +1267,7 @@ time_to_s(time) #if defined(HAVE_STRUCT_TM_TM_GMTOFF) off = tobj->tm.tm_gmtoff; #else - VALUE tmp = time_utc_offset(time); + tmp = time_utc_offset(time); off = NUM2INT(tmp); #endif if (off < 0) { -- cgit