<p dir="ltr">Thank. I'll commit this once I'm at my desk.</p>
<div class="gmail_quote">On Oct 31, 2013 11:26 AM, "Ronny Chevalier" <<a href="mailto:chevalier.ronny@gmail.com">chevalier.ronny@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
multiple warnings like<br>
<br>
src/socket-proxy/socket-proxyd.c: In function ‘transfer_data_cb’:<br>
src/socket-proxy/socket-proxyd.c:237:25: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘size_t’ [-Wformat=]<br>
log_debug("Buffer now has %ld bytes full.", c->buffer_filled_len);<br>
---<br>
src/socket-proxy/socket-proxyd.c | 12 ++++++------<br>
1 file changed, 6 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c<br>
index 054a27a..34b1c15 100644<br>
--- a/src/socket-proxy/socket-proxyd.c<br>
+++ b/src/socket-proxy/socket-proxyd.c<br>
@@ -129,7 +129,7 @@ static int send_buffer(struct connection *sender) {<br>
* it does. */<br>
while (sender->buffer_filled_len > sender->buffer_sent_len) {<br>
len = send(receiver->fd, sender->buffer + sender->buffer_sent_len, sender->buffer_filled_len - sender->buffer_sent_len, 0);<br>
- log_debug("send(%d, ...)=%ld", receiver->fd, len);<br>
+ log_debug("send(%d, ...)=%zd", receiver->fd, len);<br>
if (len < 0) {<br>
if (errno != EWOULDBLOCK && errno != EAGAIN) {<br>
log_error("Error %d in send to fd=%d: %m", errno, receiver->fd);<br>
@@ -147,7 +147,7 @@ static int send_buffer(struct connection *sender) {<br>
sender->buffer_sent_len += len;<br>
}<br>
<br>
- log_debug("send(%d, ...) completed with %lu bytes still buffered.", receiver->fd, sender->buffer_filled_len - sender->buffer_sent_len);<br>
+ log_debug("send(%d, ...) completed with %zd bytes still buffered.", receiver->fd, sender->buffer_filled_len - sender->buffer_sent_len);<br>
<br>
/* Detect a would-block state or partial send. */<br>
if (sender->buffer_filled_len > sender->buffer_sent_len) {<br>
@@ -206,13 +206,13 @@ static int transfer_data_cb(sd_event_source *s, int fd, uint32_t revents, void *<br>
log_debug("Got event revents=%d from fd=%d (conn %p).", revents, fd, c);<br>
<br>
if (revents & EPOLLIN) {<br>
- log_debug("About to recv up to %lu bytes from fd=%d (%lu/BUFFER_SIZE).", BUFFER_SIZE - c->buffer_filled_len, fd, c->buffer_filled_len);<br>
+ log_debug("About to recv up to %zd bytes from fd=%d (%zd/BUFFER_SIZE).", BUFFER_SIZE - c->buffer_filled_len, fd, c->buffer_filled_len);<br>
<br>
/* Receive until the buffer's full, there's no more data,<br>
* or the client/server disconnects. */<br>
while (c->buffer_filled_len < BUFFER_SIZE) {<br>
len = recv(fd, c->buffer + c->buffer_filled_len, BUFFER_SIZE - c->buffer_filled_len, 0);<br>
- log_debug("recv(%d, ...)=%ld", fd, len);<br>
+ log_debug("recv(%d, ...)=%zd", fd, len);<br>
if (len < 0) {<br>
if (errno != EWOULDBLOCK && errno != EAGAIN) {<br>
log_error("Error %d in recv from fd=%d: %m", errno, fd);<br>
@@ -232,9 +232,9 @@ static int transfer_data_cb(sd_event_source *s, int fd, uint32_t revents, void *<br>
}<br>
<br>
assert(len > 0);<br>
- log_debug("Recording that the buffer got %ld more bytes full.", len);<br>
+ log_debug("Recording that the buffer got %zd more bytes full.", len);<br>
c->buffer_filled_len += len;<br>
- log_debug("Buffer now has %ld bytes full.", c->buffer_filled_len);<br>
+ log_debug("Buffer now has %zd bytes full.", c->buffer_filled_len);<br>
}<br>
<br>
/* Try sending the data immediately. */<br>
--<br>
1.8.4.2<br>
<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div>