string formatting: fix 25+ printf-style format strings

This commit is contained in:
Yang Tse
2013-07-23 15:59:07 +02:00
parent 1a593191c2
commit de052ca6fc
12 changed files with 56 additions and 34 deletions

View File

@@ -6,6 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
* Copyright (C) 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -84,9 +85,10 @@ bool Curl_pipeline_penalized(struct SessionHandle *data,
(curl_off_t)conn->chunk.datasize > chunk_penalty_size)
penalized = TRUE;
infof(data, "Conn: %d (%p) Receive pipe weight: (%d/%d), penalized: %d\n",
conn->connection_id, conn, recv_size,
conn->chunk.datasize, penalized);
infof(data, "Conn: %ld (%p) Receive pipe weight: (%" FORMAT_OFF_T
"/%zd), penalized: %s\n",
conn->connection_id, (void *)conn, recv_size,
conn->chunk.datasize, penalized?"TRUE":"FALSE");
return penalized;
}
return FALSE;
@@ -101,7 +103,7 @@ CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle,
pipeline = conn->send_pipe;
infof(conn->data, "Adding handle: conn: %p\n", conn);
infof(conn->data, "Adding handle: conn: %p\n", (void *)conn);
infof(conn->data, "Adding handle: send: %d\n", conn->send_pipe->size);
infof(conn->data, "Adding handle: recv: %d\n", conn->recv_pipe->size);
rc = Curl_addHandleToPipeline(handle, pipeline);
@@ -111,7 +113,7 @@ CURLcode Curl_add_handle_to_pipeline(struct SessionHandle *handle,
conn->writechannel_inuse = FALSE; /* not in use yet */
#ifdef DEBUGBUILD
infof(conn->data, "%p is at send pipe head!\n",
conn->send_pipe->head->ptr);
(void *)conn->send_pipe->head->ptr);
#endif
Curl_expire(conn->send_pipe->head->ptr, 1);
}
@@ -144,7 +146,7 @@ void Curl_move_handle_from_send_to_recv_pipe(struct SessionHandle *handle,
conn->writechannel_inuse = FALSE; /* not used now */
#ifdef DEBUGBUILD
infof(conn->data, "%p is at send pipe head B!\n",
conn->send_pipe->head->ptr);
(void *)conn->send_pipe->head->ptr);
#endif
Curl_expire(conn->send_pipe->head->ptr, 1);
}
@@ -320,9 +322,9 @@ void print_pipeline(struct connectdata *conn)
curr = cb_ptr->conn_list->head;
while(curr) {
conn = curr->ptr;
infof(data, "- Conn %d (%p) send_pipe: %d, recv_pipe: %d\n",
infof(data, "- Conn %ld (%p) send_pipe: %zd, recv_pipe: %zd\n",
conn->connection_id,
conn,
(void *)conn,
conn->send_pipe->size,
conn->recv_pipe->size);
curr = curr->next;