Commit 1502c8db authored by Olivier Crête's avatar Olivier Crête

tests: Use right type when taking to stdio f*() C APIs

parent 5c3a9056
...@@ -60,8 +60,8 @@ static void adjust_clock (PseudoTcpSocket *sock); ...@@ -60,8 +60,8 @@ static void adjust_clock (PseudoTcpSocket *sock);
static void write_to_sock (PseudoTcpSocket *sock) static void write_to_sock (PseudoTcpSocket *sock)
{ {
gchar buf[1024]; gchar buf[1024];
guint len; gsize len;
guint wlen; gint wlen;
guint total = 0; guint total = 0;
while (TRUE) { while (TRUE) {
...@@ -72,10 +72,10 @@ static void write_to_sock (PseudoTcpSocket *sock) ...@@ -72,10 +72,10 @@ static void write_to_sock (PseudoTcpSocket *sock)
break; break;
} else { } else {
wlen = pseudo_tcp_socket_send (sock, buf, len); wlen = pseudo_tcp_socket_send (sock, buf, len);
g_debug ("Sending %d bytes : %d", len, wlen); g_debug ("Sending %" G_GSIZE_FORMAT " bytes : %d", len, wlen);
total += wlen; total += wlen;
total_read += wlen; total_read += wlen;
if (wlen < len) { if (wlen < (gint) len) {
fseek (in, wlen - len, SEEK_CUR); fseek (in, wlen - len, SEEK_CUR);
g_debug ("Socket queue full after %d bytes written", total); g_debug ("Socket queue full after %d bytes written", total);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment