diff options
author | Ronny Chevalier <chevalier.ronny@gmail.com> | 2013-10-31 19:26:32 +0100 |
---|---|---|
committer | David Strauss <david@davidstrauss.net> | 2013-10-31 23:17:46 +0100 |
commit | 0885468d80e77758bd4c125d3686b68484ef77c4 (patch) | |
tree | b8db66bbc962cf07641d36e44bb6e88aa0b7fe10 /src/socket-proxy | |
parent | analyze: share code to read a string array from sd-bus (diff) | |
download | systemd-0885468d80e77758bd4c125d3686b68484ef77c4.tar.xz systemd-0885468d80e77758bd4c125d3686b68484ef77c4.zip |
fix compiler warnings
multiple warnings like
src/socket-proxy/socket-proxyd.c: In function ‘transfer_data_cb’:
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=]
log_debug("Buffer now has %ld bytes full.", c->buffer_filled_len);
Diffstat (limited to 'src/socket-proxy')
-rw-r--r-- | src/socket-proxy/socket-proxyd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c index 054a27a71b..34b1c15dfe 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -129,7 +129,7 @@ static int send_buffer(struct connection *sender) { * it does. */ while (sender->buffer_filled_len > sender->buffer_sent_len) { len = send(receiver->fd, sender->buffer + sender->buffer_sent_len, sender->buffer_filled_len - sender->buffer_sent_len, 0); - log_debug("send(%d, ...)=%ld", receiver->fd, len); + log_debug("send(%d, ...)=%zd", receiver->fd, len); if (len < 0) { if (errno != EWOULDBLOCK && errno != EAGAIN) { log_error("Error %d in send to fd=%d: %m", errno, receiver->fd); @@ -147,7 +147,7 @@ static int send_buffer(struct connection *sender) { sender->buffer_sent_len += len; } - log_debug("send(%d, ...) completed with %lu bytes still buffered.", receiver->fd, sender->buffer_filled_len - sender->buffer_sent_len); + log_debug("send(%d, ...) completed with %zd bytes still buffered.", receiver->fd, sender->buffer_filled_len - sender->buffer_sent_len); /* Detect a would-block state or partial send. */ if (sender->buffer_filled_len > sender->buffer_sent_len) { @@ -206,13 +206,13 @@ static int transfer_data_cb(sd_event_source *s, int fd, uint32_t revents, void * log_debug("Got event revents=%d from fd=%d (conn %p).", revents, fd, c); if (revents & EPOLLIN) { - 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); + 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); /* Receive until the buffer's full, there's no more data, * or the client/server disconnects. */ while (c->buffer_filled_len < BUFFER_SIZE) { len = recv(fd, c->buffer + c->buffer_filled_len, BUFFER_SIZE - c->buffer_filled_len, 0); - log_debug("recv(%d, ...)=%ld", fd, len); + log_debug("recv(%d, ...)=%zd", fd, len); if (len < 0) { if (errno != EWOULDBLOCK && errno != EAGAIN) { log_error("Error %d in recv from fd=%d: %m", errno, fd); @@ -232,9 +232,9 @@ static int transfer_data_cb(sd_event_source *s, int fd, uint32_t revents, void * } assert(len > 0); - log_debug("Recording that the buffer got %ld more bytes full.", len); + log_debug("Recording that the buffer got %zd more bytes full.", len); c->buffer_filled_len += len; - log_debug("Buffer now has %ld bytes full.", c->buffer_filled_len); + log_debug("Buffer now has %zd bytes full.", c->buffer_filled_len); } /* Try sending the data immediately. */ |