aboutsummaryrefslogtreecommitdiffstats
path: root/strftime.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-22 00:27:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-22 00:27:33 +0000
commitd5704eb61aee97081c0ceed99608be4287835c23 (patch)
tree9057d799e7c6fdb5ee254e833507f2cb27e3dc0b /strftime.c
parenta69b87e80eccfe22c5d67141a91d12af9194bcae (diff)
downloadruby-d5704eb61aee97081c0ceed99608be4287835c23.tar.gz
* time.c (localtime_with_gmtoff): fixed cross function jump.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'strftime.c')
-rw-r--r--strftime.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/strftime.c b/strftime.c
index 69012b122c..3727bc40ea 100644
--- a/strftime.c
+++ b/strftime.c
@@ -202,7 +202,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
static short first = 1;
#ifdef POSIX_SEMANTICS
static char *savetz = NULL;
- static int savetzlen = 0;
+ static size_t savetzlen = 0;
char *tz;
#endif /* POSIX_SEMANTICS */
#ifndef HAVE_TM_ZONE
@@ -250,7 +250,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
tz = getenv("TZ");
if (first) {
if (tz != NULL) {
- int tzlen = strlen(tz);
+ size_t tzlen = strlen(tz);
savetz = (char *) malloc(tzlen + 1);
if (savetz != NULL) {
@@ -263,7 +263,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
}
/* if we have a saved TZ, and it is different, recapture and reset */
if (tz && savetz && (tz[0] != savetz[0] || strcmp(tz, savetz) != 0)) {
- i = strlen(tz) + 1;
+ size_t i = strlen(tz) + 1;
if (i > savetzlen) {
savetz = (char *) realloc(savetz, i);
if (savetz) {
@@ -892,7 +892,7 @@ vtm2tm_noyear(const struct vtm *vtm, struct tm *result)
tm.tm_gmtoff = NUM2LONG(vtm->utc_offset);
#endif
#if defined(HAVE_TM_ZONE)
- tm.tm_zone = vtm->zone;
+ tm.tm_zone = (char *)vtm->zone;
#endif
*result = tm;
}