]> code.delx.au - pulseaudio/commitdiff
pacmd: Fix compiler warning
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Sun, 12 Feb 2012 17:44:20 +0000 (23:14 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Sun, 12 Feb 2012 17:45:59 +0000 (23:15 +0530)
We were comparing an int with a size_t.

src/utils/pacmd.c

index 802832c413ed94a939a45b1d9e148d449a4fac4d..28411d3deb7e8ec3659af41fc403cf5530d4e8a9 100644 (file)
@@ -49,7 +49,7 @@ int main(int argc, char*argv[]) {
     struct sockaddr_un sa;
     char *ibuf = NULL;
     char *obuf = NULL;
-    size_t ibuf_size, ibuf_index, ibuf_length, obuf_size, obuf_index, obuf_length;
+    size_t buf_size, ibuf_size, ibuf_index, ibuf_length, obuf_size, obuf_index, obuf_length;
     char *cli;
     pa_bool_t ibuf_eof, obuf_eof, ibuf_closed, obuf_closed;
     struct pollfd pollfd[3];
@@ -105,10 +105,10 @@ int main(int argc, char*argv[]) {
         goto fail;
     }
 
-    i = pa_pipe_buf(fd);
-    ibuf_size = PA_MIN(i, pa_pipe_buf(STDIN_FILENO));
+    buf_size = pa_pipe_buf(fd);
+    ibuf_size = PA_MIN(buf_size, pa_pipe_buf(STDIN_FILENO));
     ibuf = pa_xmalloc(ibuf_size);
-    obuf_size = PA_MIN(i, pa_pipe_buf(STDOUT_FILENO));
+    obuf_size = PA_MIN(buf_size, pa_pipe_buf(STDOUT_FILENO));
     obuf = pa_xmalloc(obuf_size);
     ibuf_index = ibuf_length = obuf_index = obuf_length = 0;
     ibuf_eof = obuf_eof = ibuf_closed = obuf_closed = FALSE;