summaryrefslogtreecommitdiff
path: root/compat/win32/pthread.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2013-04-27 19:16:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-28 19:26:45 (GMT)
commit9c3b051f931af9e3bcc765a4c83426e3be7de7f1 (patch)
tree4bf67a11a11f6b8d67be5f1a93d76a8fbd6d21d4 /compat/win32/pthread.c
parentec535cc27e6c4f5e0b1d157e04f5511f166ecd9d (diff)
downloadgit-9c3b051f931af9e3bcc765a4c83426e3be7de7f1.zip
git-9c3b051f931af9e3bcc765a4c83426e3be7de7f1.tar.gz
git-9c3b051f931af9e3bcc765a4c83426e3be7de7f1.tar.bz2
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>
Diffstat (limited to 'compat/win32/pthread.c')
-rw-r--r--compat/win32/pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/win32/pthread.c b/compat/win32/pthread.c
index 010e875..e18f5c6 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;
}