This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix -Wempty-body warnings in system-specific code


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]