From: Ramsay Jones Date: Sat, 27 Apr 2013 19:17:14 +0000 (+0100) Subject: compat/poll/poll.c: Fix a sparse warning X-Git-Tag: v1.8.4-rc0~250^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1c31596a4b029e51cef1c520f32a3ecfbdea3c0a?hp=--cc compat/poll/poll.c: Fix a sparse warning Sparse issues an 'Using plain integer as NULL pointer' warning when passing the constant '0' as the second parameter in the call to the WSAEventSelect() function. The function parameter has a pointer type (WSAEVENT, aka HANDLE, aka void *) so that, in order to suppress the warning, we simply pass NULL for that parameter in the function call expression. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- 1c31596a4b029e51cef1c520f32a3ecfbdea3c0a diff --git a/compat/poll/poll.c b/compat/poll/poll.c index 7d226ecb29..44103103a4 100644 --- a/compat/poll/poll.c +++ b/compat/poll/poll.c @@ -576,7 +576,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout) { /* It's a socket. */ WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev); - WSAEventSelect ((SOCKET) h, 0, 0); + WSAEventSelect ((SOCKET) h, NULL, 0); /* If we're lucky, WSAEnumNetworkEvents already provided a way to distinguish FD_READ and FD_ACCEPT; this saves a recv later. */