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

[PATCH] gc: fix some sparse 'symbol not declared' warnings

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Jul 9, 2020, 00:23 UTC
Message-ID
<9c9164e2-0fff-7211-a79a-f4c546d2cedd@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Derrick,

If you need to re-roll your 'ds/maintenance' branch, could you please squash this into the relevant patches. The first hunk should be squashed into commit a138b8ff61 (maintenance: create basic maintenance runner, 2020-07-07) and the second hunk into commit aca963ff39 (maintenance: initialize task array and hashmap, 2020-07-07).

Thanks!

ATB, Ramsay Jones

 builtin/gc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/gc.c b/builtin/gc.c
index c3531561c2..de029d687b 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -716,7 +716,7 @@ static const char * const builtin_maintenance_usage[] = {
 	NULL
 };
 
-struct maintenance_opts {
+static struct maintenance_opts {
 	int auto_flag;
 	int quiet;
 	int tasks_selected;
@@ -1297,9 +1297,9 @@ static int task_entry_cmp(const void *unused_cmp_data,
 	return strcasecmp(e1->name, name ? name : e2->name);
 }
 
-struct maintenance_task *tasks[MAX_NUM_TASKS];
-int num_tasks;
-struct hashmap task_map;
+static struct maintenance_task *tasks[MAX_NUM_TASKS];
+static int num_tasks;
+static struct hashmap task_map;
 
 static int compare_tasks_by_selection(const void *a_, const void *b_)
 {
-- 
2.27.0
Next: Derrick Stolee
Message 1 of 2 in “gc: fix some sparse 'symbol not declared' warnings”
  1. gc: fix some sparse 'symbol not declared' warningsRamsay Jones, Jul 9, 2020
  2. Derrick StoleeJul 9, 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.