]> git.imager.perl.org - imager.git/commitdiff
avoid a probably unwarranted compiler warning
authorTony Cook <tony@develop-help.com>
Mon, 18 Feb 2013 12:31:35 +0000 (23:31 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 18 Feb 2013 12:31:35 +0000 (23:31 +1100)
iolayer.c

index d92748a0d1131910c67a4142e70e8be60b9a57a8..39c8c298a583ceee516ddeb78f85ae7c54e733c8 100644 (file)
--- a/iolayer.c
+++ b/iolayer.c
@@ -1187,6 +1187,9 @@ i_io_read_fill(io_glue *ig, ssize_t needed) {
     work = ig->buffer;
   }
 
+  /* there should always be buffer space the first time around, but
+     avoid a compiler warning here */
+  rc = -1;
   while (work < buf_end && (rc = i_io_raw_read(ig, work, buf_end - work)) > 0) {
     work += rc;
     good = 1;