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

[PATCH 1/2] strmap: do not "return" in a void function

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Dec 15, 2020, 23:50 UTC
Message-ID
<20201215235027.10401-2-avarab@gmail.com>
In-Reply-To
<xmqq7dpkdup6.fsf@gitster.c.googlers.com>

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.

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)
-- 
2.29.2.222.g5d2a92d10f8
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “[ANNOUNCE] Git v2.30.0-rc0”
  1. Junio C HamanoDec 14, 2020
  2. 2/2 style: do not "break" in switch() after "return"Ævar Arnfjörð Bjarmason, Dec 15, 2020
  3. Junio C HamanoDec 16, 2020
  4. Junio C HamanoDec 16, 2020
  5. 1/2 strmap: do not "return" in a void functionÆvar Arnfjörð Bjarmason, Dec 15, 2020
  6. Junio C HamanoDec 16, 2020
  7. 0/2 Make v2.30.0-rc0 compile on SunCCÆvar Arnfjörð Bjarmason, Dec 15, 2020

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.