This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix -Wempty-body warnings in system-specific code
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 18 Feb 2019 20:55:21 +0100
- Subject: Re: Fix -Wempty-body warnings in system-specific code
- References: <alpine.DEB.2.21.1902181825530.12080@digraph.polyomino.org.uk>
On Feb 18 2019, Joseph Myers <joseph@codesourcery.com> wrote:
> diff --git a/sysdeps/m68k/wcpcpy.c b/sysdeps/m68k/wcpcpy.c
> index a4bac08308..daeffc8f9b 100644
> --- a/sysdeps/m68k/wcpcpy.c
> +++ b/sysdeps/m68k/wcpcpy.c
> @@ -27,7 +27,8 @@ wchar_t *
> __wcpcpy (wchar_t *dest, const wchar_t *src)
> {
> do
> - ;
> + {
> + }
> while ((*dest++ = *src++));
There is no point in using do..while here.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."