]> git.ipfire.org Git - thirdparty/coreutils.git/commit
build: rearrange yes(1) code to prevent GCC 10 warning
authorChris Meyering <christophe.meyering@gmail.com>
Thu, 30 Jan 2020 06:34:48 +0000 (22:34 -0800)
committerPádraig Brady <P@draigBrady.com>
Thu, 30 Jan 2020 18:38:18 +0000 (18:38 +0000)
commitdda53d75a89c5dda63c51b05c3e9953de471fd4c
tree28ea90c187c6c3ba437a065e78668adebe105ff2
parentfbbf81ec006a5ab6de000efbb0322824d45bc6dc
build: rearrange yes(1) code to prevent GCC 10 warning

* src/yes.c (main): Convert for loop to do-while in order to indicate
that the loop will be run at least once.
This avoids the following warning after the second loop:
src/yes.c:110:20: error: writing 1 byte into a region of size 0
src/yes.c