git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix gcc-4 warning in accept() call

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Sep 30, 2005, 05:58 UTC
Message-ID
<433CD412.8020409@zytor.com>
In-Reply-To
<433CD2E7.5090909@zytor.com>
H. Peter Anvin wrote:
Show 18 quoted lines
> Junio C Hamano wrote:
> 
>> 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.
> 

Apparently I'm wrong; socklen_t is unsigned int at least on glibc for i386. I'll shut up now.

	-hpa
Previous: H. Peter AnvinNext: Junio C Hamano
Message 4 of 5 in “Fix gcc-4 warning in accept() call”
  1. Fix gcc-4 warning in accept() callPavel Roskin, Sep 29, 2005
  2. Junio C HamanoSep 30, 2005
  3. H. Peter AnvinSep 30, 2005
  4. H. Peter AnvinSep 30, 2005
  5. Junio C HamanoSep 30, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.