]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: avoid a new -Werror=return-type warning in yes.c
authorPádraig Brady <P@draigBrady.com>
Tue, 28 Apr 2015 22:07:13 +0000 (23:07 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 28 Apr 2015 22:07:13 +0000 (23:07 +0100)
* src/yes.c (main): Simplify the logic so that the
compiler can see this function always returns a value.
This was seen with GCC 5.0 in SINGLE_BINARY mode.

src/yes.c

index 3b7b4c62198671cc9321bb9c4cf1a2f57d7c23ee..07885be9b402370d9c670d4e9c97a66ffe4da5f3 100644 (file)
--- a/src/yes.c
+++ b/src/yes.c
@@ -115,7 +115,7 @@ main (int argc, char **argv)
 
   /* If the data doesn't fit in BUFSIZ then output
      what we've buffered, and iterate over the remaining items.  */
-  while (i != argc)
+  while (true /* i != argc */)
     {
       int j;
       if ((pbuf - buf) && fwrite (buf, pbuf - buf, 1, stdout) != 1)