From: Ramsay Jones Date: Sat, 27 Apr 2013 19:16:28 +0000 (+0100) Subject: compat/win32/pthread.c: Fix a sparse warning X-Git-Tag: v1.8.4-rc0~250^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c3b051f931af9e3bcc765a4c83426e3be7de7f1;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/compat/win32/pthread.c b/compat/win32/pthread.c index 010e875ec4..e18f5c6e2e 100644 --- a/compat/win32/pthread.c +++ b/compat/win32/pthread.c @@ -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; }