Author: rjung Date: Tue Sep 1 14:01:25 2015 New Revision: 1700553 URL: http://svn.apache.org/r1700553 Log: Silence "loss of precision" compiler warnings on Windows.
The loss is acceptable, actual values will be well within the int range. Modified: tomcat/jk/trunk/native/common/jk_lb_worker.c tomcat/jk/trunk/native/common/jk_util.c Modified: tomcat/jk/trunk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_lb_worker.c?rev=1700553&r1=1700552&r2=1700553&view=diff ============================================================================== --- tomcat/jk/trunk/native/common/jk_lb_worker.c (original) +++ tomcat/jk/trunk/native/common/jk_lb_worker.c Tue Sep 1 14:01:25 2015 @@ -745,7 +745,7 @@ static int JK_METHOD maintain_workers(jk * before the interval has passed, we allow a little tolerance. */ if (global == JK_TRUE) { - time_t exponent = JK_LB_DECAY_MULT * difftime(now, lb->s->last_maintain_time) / lb->maintain_time; + time_t exponent = JK_LB_DECAY_MULT * ((long)difftime(now, lb->s->last_maintain_time)) / lb->maintain_time; lb->s->last_maintain_time = now; if (JK_IS_DEBUG_LEVEL(l)) Modified: tomcat/jk/trunk/native/common/jk_util.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_util.c?rev=1700553&r1=1700552&r2=1700553&view=diff ============================================================================== --- tomcat/jk/trunk/native/common/jk_util.c (original) +++ tomcat/jk/trunk/native/common/jk_util.c Tue Sep 1 14:01:25 2015 @@ -747,7 +747,7 @@ int jk_log(jk_logger_t *l, used += rc; if (rc < 0 ) { strcpy(buf, "Logging failed in pid/tid formatting"); - l->log(l, level, strlen(buf), buf); + l->log(l, level, (int)strlen(buf), buf); return 0; } @@ -758,7 +758,7 @@ int jk_log(jk_logger_t *l, } else { strcpy(buf, "Logging failed in log level formatting"); - l->log(l, level, strlen(buf), buf); + l->log(l, level, (int)strlen(buf), buf); return 0; /* [V] not sure what to return... */ } @@ -772,7 +772,7 @@ int jk_log(jk_logger_t *l, } else { strcpy(buf, "Logging failed in function name formatting"); - l->log(l, level, strlen(buf), buf); + l->log(l, level, (int)strlen(buf), buf); return 0; /* [V] not sure what to return... */ } } @@ -784,7 +784,7 @@ int jk_log(jk_logger_t *l, } else { strcpy(buf, "Logging failed in source file name formatting"); - l->log(l, level, strlen(buf), buf); + l->log(l, level, (int)strlen(buf), buf); return 0; /* [V] not sure what to return... */ } @@ -793,7 +793,7 @@ int jk_log(jk_logger_t *l, used += rc; if (rc < 0 || usable_size - used < 0) { strcpy(buf, "Logging failed in line number formatting"); - l->log(l, level, strlen(buf), buf); + l->log(l, level, (int)strlen(buf), buf); return 0; /* [V] not sure what to return... */ } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org