You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2006/07/21 13:09:27 UTC
svn commit: r424266 - in /tomcat/connectors/trunk/jk/native/common:
jk_ajp12_worker.c jk_ajp_common.c jk_connect.c jk_jni_worker.c
jk_lb_worker.c jk_shm.c jk_sockbuf.c jk_sockbuf.h jk_status.c jk_util.c
Author: mturk
Date: Fri Jul 21 04:09:26 2006
New Revision: 424266
URL: http://svn.apache.org/viewvc?rev=424266&view=rev
Log:
Fix compile time warnings.
No functional change, but it allows to build
on win64 platforms.
Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_connect.c
tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_shm.c
tomcat/connectors/trunk/jk/native/common/jk_sockbuf.c
tomcat/connectors/trunk/jk/native/common/jk_sockbuf.h
tomcat/connectors/trunk/jk/native/common/jk_status.c
tomcat/connectors/trunk/jk/native/common/jk_util.c
Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp12_worker.c Fri Jul 21 04:09:26 2006
@@ -313,7 +313,7 @@
{
int bufferlen;
- if (buffer && (bufferlen = strlen(buffer))) {
+ if (buffer && (bufferlen = (int)strlen(buffer))) {
#if defined(AS400) || defined(_OSD_POSIX)
char buf[2048];
if (bufferlen < 2048) {
Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Fri Jul 21 04:09:26 2006
@@ -738,7 +738,7 @@
{
int rc;
ajp_worker_t *aw = ae->worker;
- int sock = ae->sd;
+ jk_sock_t sock = ae->sd;
/* Mark existing endpoint socket as closed */
ae->sd = JK_INVALID_SOCKET;
@@ -775,7 +775,7 @@
tv.tv_usec = (timeout % 1000) * 1000;
do {
- rc = select(ae->sd + 1, &rset, NULL, NULL, &tv);
+ rc = select((int)ae->sd + 1, &rset, NULL, NULL, &tv);
} while (rc < 0 && errno == EINTR);
if (rc == 0) {
@@ -2082,7 +2082,8 @@
JK_ENTER_CS(&w->cs, rc);
if (rc) {
- int i, sock = JK_INVALID_SOCKET;
+ int i;
+ jk_sock_t sock = JK_INVALID_SOCKET;
if (p->sd > 0 && !p->reuse) {
sock = p->sd;
Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Fri Jul 21 04:09:26 2006
@@ -52,7 +52,7 @@
typedef const char* SET_TYPE;
#endif
-static int soblock(int sd)
+static int soblock(jk_sock_t sd)
{
/* BeOS uses setsockopt at present for non blocking... */
#ifndef WIN32
@@ -136,7 +136,7 @@
tv.tv_sec = timeout;
tv.tv_usec = 0;
- rc = select(sock + 1, NULL, &wfdset, &efdset, &tv);
+ rc = select((int)sock + 1, NULL, &wfdset, &efdset, &tv);
if (rc == SOCKET_ERROR || rc == 0) {
rc = WSAGetLastError();
soblock(sock);
@@ -634,7 +634,7 @@
tv.tv_usec = 1;
/* If we get a timeout, then we are still connected */
- if ((rc = select(sock + 1, &fd, NULL, NULL, &tv)) == 0) {
+ if ((rc = select((int)sock + 1, &fd, NULL, NULL, &tv)) == 0) {
errno = 0;
return 1;
}
Modified: tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_jni_worker.c Fri Jul 21 04:09:26 2006
@@ -834,7 +834,7 @@
jk_log(l, JK_LOG_DEBUG, "got default jvm args");
if (vm_args.classpath) {
- unsigned len = strlen(vm_args.classpath) +
+ size_t len = strlen(vm_args.classpath) +
strlen(p->tomcat_classpath) + 3;
char *tmp = jk_pool_alloc(&p->p, len);
if (tmp) {
@@ -907,7 +907,7 @@
static char *build_opt_str(jk_pool_t *p,
char *opt_name, char *opt_value, jk_logger_t *l)
{
- unsigned len = strlen(opt_name) + strlen(opt_value) + 2;
+ size_t len = strlen(opt_name) + strlen(opt_value) + 2;
/* [V] IMHO, these should not be deallocated as long as the JVM runs */
char *tmp = jk_pool_alloc(p, len);
@@ -927,7 +927,7 @@
char *opt_name, int opt_value, jk_logger_t *l)
{
/* [V] this should suffice even for 64-bit int */
- unsigned len = strlen(opt_name) + 20 + 2;
+ size_t len = strlen(opt_name) + 20 + 2;
/* [V] IMHO, these should not be deallocated as long as the JVM runs */
char *tmp = jk_pool_alloc(p, len);
Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Fri Jul 21 04:09:26 2006
@@ -265,7 +265,7 @@
* for the routing decisions.
*/
static jk_uint64_t decay_load(lb_worker_t *p,
- int exponent,
+ time_t exponent,
jk_logger_t *l)
{
unsigned int i;
Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_shm.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_shm.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_shm.c Fri Jul 21 04:09:26 2006
@@ -97,7 +97,7 @@
NULL,
PAGE_READWRITE,
0,
- sizeof(jk_shm_header_t) + sz,
+ (DWORD)(sizeof(jk_shm_header_t) + sz),
fname);
if (jk_shm_map == NULL || jk_shm_map == INVALID_HANDLE_VALUE &&
GetLastError() == ERROR_ALREADY_EXISTS)
Modified: tomcat/connectors/trunk/jk/native/common/jk_sockbuf.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_sockbuf.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_sockbuf.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_sockbuf.c Fri Jul 21 04:09:26 2006
@@ -25,7 +25,7 @@
static int fill_buffer(jk_sockbuf_t *sb);
-int jk_sb_open(jk_sockbuf_t *sb, int sd)
+int jk_sb_open(jk_sockbuf_t *sb, jk_sock_t sd)
{
if (sb && sd >= 0) {
sb->end = 0;
Modified: tomcat/connectors/trunk/jk/native/common/jk_sockbuf.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_sockbuf.h?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_sockbuf.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_sockbuf.h Fri Jul 21 04:09:26 2006
@@ -33,7 +33,7 @@
};
typedef struct jk_sockbuf jk_sockbuf_t;
-int jk_sb_open(jk_sockbuf_t *sb, int sd);
+int jk_sb_open(jk_sockbuf_t *sb, jk_sock_t sd);
int jk_sb_write(jk_sockbuf_t *sb, const void *buf, unsigned sz);
Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Fri Jul 21 04:09:26 2006
@@ -260,7 +260,7 @@
static void jk_puts(jk_ws_service_t *s, const char *str)
{
if (str)
- s->write(s, str, strlen(str));
+ s->write(s, str, (unsigned int)strlen(str));
else
s->write(s, "(null)", 6);
}
@@ -275,7 +275,7 @@
str = va_arg(va, const char *);
if (str == NULL)
break;
- s->write(s, str, strlen(str));
+ s->write(s, str, (unsigned int)strlen(str));
}
va_end(va);
}
Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?rev=424266&r1=424265&r2=424266&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Fri Jul 21 04:09:26 2006
@@ -299,7 +299,7 @@
#endif
char *f = (char *)(file + strlen(file) - 1);
va_list args;
- int used = 0;
+ size_t used = 0;
while (f != file && '\\' != *f && '/' != *f) {
f--;
@@ -335,7 +335,7 @@
used += 8;
if (funcname) {
- rc = strlen(funcname) + 2;
+ rc = (int)strlen(funcname) + 2;
if (usable_size - used >= rc) {
strcat(buf, funcname);
strcat(buf, "::");
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org