1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-07 23:36:32 +02:00

compat/win32/pthread.c: Fix a sparse warning

Sparse issues a 'Using plain integer as NULL pointer' warning when
initializing an pthread_t structure with an '{ 0 }' initializer.
The first field of the pthread_t structure has type HANDLE (void *),
so in order to suppress the warning, we replace the initializer
expression with '{ NULL }'.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ramsay Jones 2013-04-27 20:16:28 +01:00 committed by Junio C Hamano
parent ec535cc27e
commit 9c3b051f93

View File

@ -52,7 +52,7 @@ int win32_pthread_join(pthread_t *thread, void **value_ptr)
pthread_t pthread_self(void)
{
pthread_t t = { 0 };
pthread_t t = { NULL };
t.tid = GetCurrentThreadId();
return t;
}