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

[PATCH] sh-i18n--envsubst: retire unused string_list_member()

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 11, 2014, 22:46 UTC
Message-ID
<1394578004-18638-1-git-send-email-sunshine@sunshineco.com>

This static function has no callers, nor has it had any since its introduction in ba67aaf2d05d (git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext(), 2011-05-14). Remove it.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---

The latest Apple developer tools (just released) has -Wunused-function enabled by default, thus it complains about this anomaly.

 sh-i18n--envsubst.c | 12 ------------
 1 file changed, 12 deletions(-)
diff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c
index 5ddd688..855d28c 100644
--- a/sh-i18n--envsubst.c
+++ b/sh-i18n--envsubst.c
@@ -237,18 +237,6 @@ string_list_sort (string_list_ty *slp)
     qsort (slp->item, slp->nitems, sizeof (slp->item[0]), cmp_string);
 }
 
-/* Test whether a string list contains a given string.  */
-static inline int
-string_list_member (const string_list_ty *slp, const char *s)
-{
-  size_t j;
-
-  for (j = 0; j < slp->nitems; ++j)
-    if (strcmp (slp->item[j], s) == 0)
-      return 1;
-  return 0;
-}
-
 /* Test whether a sorted string list contains a given string.  */
 static int
 sorted_string_list_member (const string_list_ty *slp, const char *s)
-- 
1.9.0.282.g01e9d92
Message 1 of 1 in “sh-i18n--envsubst: retire unused string_list_member()”
  1. sh-i18n--envsubst: retire unused string_list_member()Eric Sunshine, Mar 11, 2014

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.