Skip to content

Commit 9c3b051

Browse files
Ramsay Jonesgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ec535cc commit 9c3b051

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/win32/pthread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int win32_pthread_join(pthread_t *thread, void **value_ptr)
5252

5353
pthread_t pthread_self(void)
5454
{
55-
pthread_t t = { 0 };
55+
pthread_t t = { NULL };
5656
t.tid = GetCurrentThreadId();
5757
return t;
5858
}

0 commit comments

Comments
 (0)