[PATCH 1/7] msvcrt: Remove return after _endthread().

Piotr Caban piotr.caban at gmail.com
Tue May 4 08:00:52 CDT 2021


On 5/4/21 2:41 PM, Arkadiusz Hiler wrote:
> On Tue, May 04, 2021 at 02:30:56PM +0200, Piotr Caban wrote:
>> Hi Arek,
>>
>> On 5/4/21 1:49 PM, Arkadiusz Hiler wrote:
>>> Signed-off-by: Arkadiusz Hiler <ahiler at codeweavers.com>
>>> ---
>>>    dlls/msvcrt/thread.c | 1 -
>>>    1 file changed, 1 deletion(-)
>>>
>>> diff --git a/dlls/msvcrt/thread.c b/dlls/msvcrt/thread.c
>>> index 650afdc08af..c2fc863dd33 100644
>>> --- a/dlls/msvcrt/thread.c
>>> +++ b/dlls/msvcrt/thread.c
>>> @@ -103,7 +103,6 @@ static DWORD CALLBACK _beginthread_trampoline(LPVOID arg)
>>>        local_trampoline.start_address(local_trampoline.arglist);
>>>        _endthread();
>>> -    return 0;
>>>    }
>> Even so the return will be never reached removing it will cause a compiler
>> warning.
> 
> It should not create a warning as both _endthread and _endthreadex are
> DECLSPEC_NORETURN. There also seem to be a lot of places where we
> ExitThread() without having it followed by a return in non-void
> functions, so I don't think this is a complete novelty.
> 
> Anyway, we can skip this patch if having a return here is preferred. It
> was just bugging me visually.
> 
Sorry, I was in middle of something and the warning was from other 
unfinished work. Taking in account it's already done this way in other 
places I think it's ok to remove the return statement.



More information about the wine-devel mailing list