Re: [PATCH] Fix gcc-4 warning in accept() call
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- Sep 30, 2005, 05:53 UTC
- Message-ID
- <433CD2E7.5090909@zytor.com>
- In-Reply-To
- <7vachv9kbq.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 11 quoted lines
> Pavel Roskin <proski@gnu.org> writes: > > >>gcc-4 warns about sign mismatch in pointers. Third argument in accept() >>is socklen_t, which is unsigned. Since Linus doesn't like socklen_t >>(see commit 7fa090844f7d1624c7d1ffc621aae6aec84a1110), let's use >>unsigned int. > > Based on the list comments, I'd drop this patch -- it appears > that gcc-4 warning is useless in this case. >
No, it's not. The proper type, if you don't use socklen_t, is int, not unsigned int.
-hpa