Browse code

- 64 bits warnings fixed

Andrei Pelinescu-Onciul authored on 16/06/2005 14:59:53
Showing 2 changed files
... ...
@@ -394,8 +394,8 @@ int init_io_wait(io_wait_h* h, int max_fd, enum poll_types poll_method)
394 394
 	h->fd_hash=local_malloc(sizeof(*(h->fd_hash))*h->max_fd_no);
395 395
 	if (h->fd_hash==0){
396 396
 		LOG(L_CRIT, "ERROR: init_io_wait: could not alloc"
397
-					" fd hashtable (%d bytes)\n",
398
-					sizeof(*(h->fd_hash))*h->max_fd_no );
397
+					" fd hashtable (%ld bytes)\n",
398
+					(long)sizeof(*(h->fd_hash))*h->max_fd_no );
399 399
 		goto error;
400 400
 	}
401 401
 	memset((void*)h->fd_hash, 0, sizeof(*(h->fd_hash))*h->max_fd_no);
... ...
@@ -411,8 +411,8 @@ int init_io_wait(io_wait_h* h, int max_fd, enum poll_types poll_method)
411 411
 			h->fd_array=local_malloc(sizeof(*(h->fd_array))*h->max_fd_no);
412 412
 			if (h->fd_array==0){
413 413
 				LOG(L_CRIT, "ERROR: init_io_wait: could not"
414
-							" alloc fd array (%d bytes)\n",
415
-							sizeof(*(h->fd_hash))*h->max_fd_no);
414
+							" alloc fd array (%ld bytes)\n",
415
+							(long)sizeof(*(h->fd_hash))*h->max_fd_no);
416 416
 				goto error;
417 417
 			}
418 418
 			memset((void*)h->fd_array, 0, sizeof(*(h->fd_array))*h->max_fd_no);
... ...
@@ -1133,10 +1133,10 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
1133 1133
 			/* EAGAIN is ok if we try to empty the buffer
1134 1134
 			 * e.g.: SIGIO_RT overflow mode or EPOLL ET */
1135 1135
 			if ((errno!=EAGAIN) && (errno!=EWOULDBLOCK)){
1136
-				LOG(L_CRIT, "ERROR: handle_tcp_child: read from tcp child %d "
1136
+				LOG(L_CRIT, "ERROR: handle_tcp_child: read from tcp child %ld "
1137 1137
 						" (pid %d, no %d) %s [%d]\n",
1138
-						tcp_c-&tcp_children[0], tcp_c->pid, tcp_c->proc_no,
1139
-						strerror(errno), errno );
1138
+						(long)(tcp_c-&tcp_children[0]), tcp_c->pid,
1139
+						tcp_c->proc_no, strerror(errno), errno );
1140 1140
 			}else{
1141 1141
 				bytes=0;
1142 1142
 			}