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

Re: [PATCH] run-command: fix an 'different modifiers' sparse warning

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Feb 25, 2016, 23:08 UTC
Message-ID
<56CF896F.3000601@ramsayjones.plus.com>
In-Reply-To
<20160225213935.GA3612@sigill.intra.peff.net>
On 25/02/16 21:39, Jeff King wrote:
Show 33 quoted lines
> On Thu, Feb 25, 2016 at 12:20:12PM -0800, Junio C Hamano wrote:
> 
>> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
>>
>>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>>> ---
>>>
>>> Hi Jeff,
>>>
>>> If you need to re-roll your 'jk/epipe-in-async' branch, could you
>>> please squash this into the relevant patch. (ie. "write_or_die:
>>> handle EPIPE in async threads", 24-02-2016).
>>>
>>> Thanks!
>>
>> I actually was planning to merge this to 'next' today, so I'll
>> squash it in without waiting for a reroll.
> 
> I am OK with that. But I do find it interesting that we must mark
> NORETURN in both the declaration and the definition, but we don't for
> __attribute__((format)).
> 
>> By the way, doesn't it bother anybody to give two different types to
>> the same function depending on NO_PTHREAD?  It is not a new issue
>> added by this series, but async_exit() that claims to return int
>> does not (naturally) return anything, and sparse does not seem to
>> care (neither do we).
> 
> It would have bothered me if I had noticed. :)
> 
> It is simply a bug, and sparse (and the compiler) do not notice it
> because it only shows up if you compile with NO_PTHREADS=1. And I think
> it is added by this series:

Wow, I can't believe that I didn't notice this myself while editing the file! :-D

ATB, Ramsay Jones

Previous: Jeff King
Message 4 of 4 in “run-command: fix an 'different modifiers' sparse warning”
  1. run-command: fix an 'different modifiers' sparse warningRamsay Jones, Feb 25, 2016
  2. Junio C HamanoFeb 25, 2016
  3. Jeff KingFeb 25, 2016
  4. Ramsay JonesFeb 25, 2016

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.