All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Jeff King <peff@peff.net>, GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] run-command: fix an 'different modifiers' sparse warning
Date: Thu, 25 Feb 2016 12:20:12 -0800	[thread overview]
Message-ID: <xmqqfuwgo83n.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <56CF576B.4020401@ramsayjones.plus.com> (Ramsay Jones's message of "Thu, 25 Feb 2016 19:35:07 +0000")

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.

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).

>
> ATB,
> Ramsay Jones
>
>  run-command.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/run-command.c b/run-command.c
> index cd861bc..5dec18b 100644
> --- a/run-command.c
> +++ b/run-command.c
> @@ -625,7 +625,7 @@ int in_async(void)
>  	return !pthread_equal(main_thread, pthread_self());
>  }
>  
> -void async_exit(int code)
> +void NORETURN async_exit(int code)
>  {
>  	pthread_exit((void *)(intptr_t)code);
>  }
> @@ -675,7 +675,7 @@ int in_async(void)
>  	return process_is_async;
>  }
>  
> -int async_exit(int code)
> +int NORETURN async_exit(int code)
>  {
>  	exit(code);
>  }

  reply	other threads:[~2016-02-25 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 19:35 [PATCH] run-command: fix an 'different modifiers' sparse warning Ramsay Jones
2016-02-25 20:20 ` Junio C Hamano [this message]
2016-02-25 21:39   ` Jeff King
2016-02-25 23:08     ` Ramsay Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfuwgo83n.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.