summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-04 21:48:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-04 21:48:47 +0000
commit1252a1e4c364f00aee0ee46d7a0f01b1e7ac052e (patch)
tree3dc98cff592742831c7e36ec1456a0ead1158ed0 /time.c
parentdfac39ff8d6a080f5cb3faea44b53dbdec5e06ae (diff)
* time.c (time_to_s): variable declaration after an execution
statement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/time.c b/time.c
index 50d537b6cd..b856228518 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) {