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 18/02/2019 16:55, Andreas Schwab wrote:
> 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.
> 

Can't we just use my 'wcsmbs: optimize wcpcpy' [1] instead?

[1] https://sourceware.org/ml/libc-alpha/2019-02/msg00155.html


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