[openib-general] [PATCH] SDP warnings on x86_64

Libor Michalek libor at topspin.com
Mon Feb 14 14:20:34 PST 2005


On Mon, Feb 14, 2005 at 01:42:36PM -0800, Tom Duffy wrote:
> On Fri, 2005-02-11 at 19:47 -0800, Tom Duffy wrote:
> > On Fri, 2005-02-11 at 18:40 -0800, Libor Michalek wrote:
> > >   If no one objects, a patch to clean up compile warnings on x86_64. Most
> > > of the warnings are a result of print format mismatches, the most common
> > > being the need to use %Zu for size_t/sizeof.
> > 
> > Looks good.  This patch gets rid of the compile warnings on x86_64, but
> > I am still seeing these on sparc64:
> 
> Turns out you will see these on x86_64 too if you turn on SDP data
> debugging.

  Here's a patch for the print format warning in the debug data path.

-Libor

Index: sdp_rcvd.c
===================================================================
--- sdp_rcvd.c	(revision 1778)
+++ sdp_rcvd.c	(working copy)
@@ -234,7 +234,7 @@
 
 	SDP_EXPECT((0 < (SDP_IOCB_F_RDMA_W & iocb->flags)));
 
-	sdp_dbg_data(conn, "Write <%d> size <%d:%d:%d> mode <%d> active <%d>",
+	sdp_dbg_data(conn, "Write <%d> size <%d:%d:%Zu> mode <%d> active <%d>",
 		     iocb->key, rwch->size, iocb->len, iocb->size,
 		     conn->recv_mode, conn->snk_sent);
 	/*
@@ -303,7 +303,7 @@
 
 	SDP_CONN_STAT_SRC_INC(conn);
 
-	sdp_dbg_data(conn, "Read <%d> size <%d:%d:%d> mode <%d> active <%d>",
+	sdp_dbg_data(conn, "Read <%d> size <%d:%d:%Zu> mode <%d> active <%d>",
 		     iocb->key, rrch->size, iocb->len, iocb->size,
 		     conn->recv_mode, conn->src_sent);
 	/*
Index: sdp_send.c
===================================================================
--- sdp_send.c	(revision 1794)
+++ sdp_send.c	(working copy)
@@ -394,7 +394,8 @@
 	advt->post += (buff->tail - buff->data);
 
 	sdp_dbg_data(conn, "POST Write BUFF wrid <%llu> bytes <%u:%d>.",
-		     buff->wrid, (buff->tail - buff->data), advt->size);
+		     buff->wrid, (unsigned)(buff->tail - buff->data),
+		     advt->size);
 	/*
 	 * dequeue if needed and the queue buffer
 	 */
@@ -2267,7 +2268,7 @@
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
-	sdp_dbg_data(conn, "send state <%04x> size <%d> flags <%08x>",
+	sdp_dbg_data(conn, "send state <%04x> size <%Zu> flags <%08x>",
 		     conn->state, size, msg->msg_flags);
 	sdp_dbg_data(conn, "write IOCB <%d> addr <%p> user <%d> flag <%08lx>",
 		     req->ki_key, msg->msg_iov->iov_base,
Index: sdp_recv.c
===================================================================
--- sdp_recv.c	(revision 1794)
+++ sdp_recv.c	(working copy)
@@ -72,7 +72,7 @@
 	}
 
 	sdp_dbg_data(conn, "POST RECV BUFF wrid <%llu> of <%u> bytes.",
-		     buff->wrid, (buff->tail - buff->data));
+		     buff->wrid, (unsigned)(buff->tail - buff->data));
 	/*
 	 * post recv
 	 */
@@ -201,7 +201,7 @@
 	}
 
 	sdp_dbg_data(conn, "POST READ BUFF wrid <%llu> of <%u> bytes.",
-		     buff->wrid, (buff->tail - buff->data));
+		     buff->wrid, (unsigned)(buff->tail - buff->data));
 	/*
 	 * update send queue depth
 	 */
@@ -900,7 +900,8 @@
 	SDP_CHECK_NULL(conn, -EINVAL);
 	SDP_CHECK_NULL(buff, -EINVAL);
 
-	sdp_dbg_data(conn, "RECV BUFF, bytes <%d>", (buff->tail - buff->data));
+	sdp_dbg_data(conn, "RECV BUFF, bytes <%u>",
+		     (unsigned)(buff->tail - buff->data));
 	/*
 	 * To emulate RFC 1122 (page 88) a connection should be reset/aborted
 	 * if data is received and the receive half of the connection has been
@@ -1319,7 +1320,7 @@
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
-	sdp_dbg_data(conn, "state <%08x> size <%d> pending <%d> falgs <%08x>",
+	sdp_dbg_data(conn, "state <%08x> size <%Zu> pending <%d> falgs <%08x>",
 		     conn->state, size, conn->byte_strm, flags);
 	sdp_dbg_data(conn, "read IOCB <%d> addr <%p> users <%d> flags <%08lx>",
 		     req->ki_key, msg->msg_iov->iov_base, 



More information about the general mailing list