On 2/17/22, Martin Storsjö <[email protected]> wrote:
> On Thu, 17 Feb 2022, NightStrike wrote:
>
>> On Thu, Feb 17, 2022 at 8:27 AM Martin Storsjö <[email protected]> wrote:
>>>
>>> This avoids warnings if building code including it, with
>>> -Wstrict-prototypes. (Latest Clang defaults to enabling this warning
>>> by default.)
>>>
>>> Signed-off-by: Martin Storsjö <[email protected]>
>>> ---
>>>  mingw-w64-libraries/winpthreads/include/pthread.h | 2 +-
>>>  mingw-w64-libraries/winpthreads/src/thread.c      | 2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h 
>>> b/mingw-w64-libraries/winpthreads/include/pthread.h
>>> index fe0e821ce..5aadb1cfa 100644
>>> --- a/mingw-w64-libraries/winpthreads/include/pthread.h
>>> +++ b/mingw-w64-libraries/winpthreads/include/pthread.h
>>> @@ -393,7 +393,7 @@ int WINPTHREAD_API pthread_barrierattr_getpshared(void 
>>> **attr, int *s);
>>>  /* Private extensions for analysis and internal use.  */
>>>  struct _pthread_cleanup ** WINPTHREAD_API pthread_getclean (void);
>>>  void *                     WINPTHREAD_API pthread_gethandle (pthread_t t);
>>> -void *                     WINPTHREAD_API pthread_getevent ();
>>> +void *                     WINPTHREAD_API pthread_getevent (void);
>>>
>>>  unsigned long long         WINPTHREAD_API _pthread_rel_time_in_ms(const
>>> struct timespec *ts);
>>>  unsigned long long         WINPTHREAD_API _pthread_time_in_ms(void);
>>> diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
>>> b/mingw-w64-libraries/winpthreads/src/thread.c
>>> index 55361aec9..e3edbae8a 100644
>>> --- a/mingw-w64-libraries/winpthreads/src/thread.c
>>> +++ b/mingw-w64-libraries/winpthreads/src/thread.c
>>> @@ -1038,7 +1038,7 @@ pthread_self (void)
>>>
>>>  /* Internal helper for getting event handle of thread T.  */
>>>  void *
>>> -pthread_getevent ()
>>> +pthread_getevent (void)
>>>  {
>>>    _pthread_v *t = __pthread_self_lite ();
>>>    return (!t ? NULL : t->evStart);
>>
>> Adding unnecessary spam because of yet another poor choice of clang is
>> not something we should be catering towards.  Users can compile with
>> -Wno-strict-prototypes if it bothers them that much.
>
> Actually, my comment about Clang was wrong, I was misinformed - this
> doesn't have anything to do with Clang at all.
>
> I saw the warning fly by for every file built, when building a project
> that explicitly enables -Wstrict-prototypes.
>
> // Martin

IMO, the patch is good.

--
O.S.


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to