git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH 1/2] strmap: do not "return" in a void function
Date: Tue, 15 Dec 2020 16:24:21 -0800	[thread overview]
Message-ID: <xmqqzh2e61je.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20201215235027.10401-2-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Wed, 16 Dec 2020 00:50:26 +0100")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> On SunCC this is a hard error, and since this code first appears in
> the v2.30-0-rc0 release it won't build on Solaris SunCC.

I think we already have a fix for this.

>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  strmap.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/strmap.h b/strmap.h
> index c4c104411bf..1e152d832d6 100644
> --- a/strmap.h
> +++ b/strmap.h
> @@ -165,7 +165,7 @@ static inline int strintmap_contains(struct strintmap *map, const char *str)
>  
>  static inline void strintmap_remove(struct strintmap *map, const char *str)
>  {
> -	return strmap_remove(&map->map, str, 0);
> +	strmap_remove(&map->map, str, 0);
>  }
>  
>  static inline int strintmap_empty(struct strintmap *map)
> @@ -249,7 +249,7 @@ static inline int strset_contains(struct strset *set, const char *str)
>  
>  static inline void strset_remove(struct strset *set, const char *str)
>  {
> -	return strmap_remove(&set->map, str, 0);
> +	strmap_remove(&set->map, str, 0);
>  }
>  
>  static inline int strset_empty(struct strset *set)

  reply	other threads:[~2020-12-16  0:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 20:00 [ANNOUNCE] Git v2.30.0-rc0 Junio C Hamano
2020-12-15 23:50 ` [PATCH 0/2] Make v2.30.0-rc0 compile on SunCC Ævar Arnfjörð Bjarmason
2020-12-15 23:50 ` [PATCH 1/2] strmap: do not "return" in a void function Ævar Arnfjörð Bjarmason
2020-12-16  0:24   ` Junio C Hamano [this message]
2020-12-15 23:50 ` [PATCH 2/2] style: do not "break" in switch() after "return" Ævar Arnfjörð Bjarmason
2020-12-16  0:30   ` Junio C Hamano
2020-12-16  0:35     ` Junio C Hamano

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=xmqqzh2e61je.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).