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

[PATCH] attr: mark a file-local symbol as static

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Jan 18, 2017, 22:27 UTC
Message-ID
<89290015-7c5f-1a5d-e683-59077ae55bf5@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Brandon,

If you need to re-roll your 'bw/attr' branch, could you please squash this into the relevant patch (commit 8908457159, "attr: use hashmap for attribute dictionary", 12-01-2017).

Also, I note that, although they are declared as part of the public attr api, attr_check_clear() and attr_check_reset() are also not called outside of attr.c. Are these functions part of the public api?

Also, a minor point, but attr_check_reset() is called (line 1050) before it's definition (line 1114). This is not a problem, given the declaration in attr.h, but I prefer definitions to come before use, where possible.

Thanks!

ATB, Ramsay Jones

 attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/attr.c b/attr.c
index f5cc68b67..e68c4688f 100644
--- a/attr.c
+++ b/attr.c
@@ -83,7 +83,7 @@ static int attr_hash_entry_cmp(const struct attr_hash_entry *a,
 }
 
 /* Initialize an 'attr_hashmap' object */
-void attr_hashmap_init(struct attr_hashmap *map)
+static void attr_hashmap_init(struct attr_hashmap *map)
 {
 	hashmap_init(&map->map, (hashmap_cmp_fn) attr_hash_entry_cmp, 0);
 }
-- 
2.11.0
Next: Brandon Williams
Message 1 of 3 in “attr: mark a file-local symbol as static”
  1. attr: mark a file-local symbol as staticRamsay Jones, Jan 18, 2017
  2. Brandon WilliamsJan 18, 2017
  3. Ramsay JonesJan 19, 2017

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.