[PATCH] help.c: mark a file-local function static

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] help.c: mark a file-local function static

From: Ramsay Jones <hidden>
Date: 2016-06-15 23:04:49

Commit 4f671d74 ("help: respect new common command grouping",
18-05-2015) adds the 'cmd_group_cmp' funtion as an external
symbol.

Noticed by sparse. ("'cmd_group_cmp' was not declared. Should it
be static?")

Signed-off-by: Ramsay Jones <redacted>
---

Hi Sebastien,

If you need to re-roll the patches in your 'sg/help-group' branch,
could you please squash this into the relevant patch (commit 4f671d74).

Thanks!

ATB,
Ramsay Jones

 help.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/help.c b/help.c
index 71027b7..7881ab7 100644
--- a/help.c
+++ b/help.c
@@ -218,7 +218,7 @@ void list_commands(unsigned int colopts,
 	}
 }
 
-int cmd_group_cmp(const void *elem1, const void *elem2)
+static int cmd_group_cmp(const void *elem1, const void *elem2)
 {
 	const struct cmdname_help *e1 = elem1;
 	const struct cmdname_help *e2 = elem2;
-- 
2.4.0

Re: [PATCH] help.c: mark a file-local function static

From: Sébastien Guimmara <hidden>
Date: 2016-06-15 23:04:49

Hi Ramsay,

thanks for pointing that out, will squash it.

Sébastien

On 05/19/2015 09:15 PM, Ramsay Jones wrote:
quoted hunk
Commit 4f671d74 ("help: respect new common command grouping",
18-05-2015) adds the 'cmd_group_cmp' funtion as an external
symbol.

Noticed by sparse. ("'cmd_group_cmp' was not declared. Should it
be static?")

Signed-off-by: Ramsay Jones <redacted>
---

Hi Sebastien,

If you need to re-roll the patches in your 'sg/help-group' branch,
could you please squash this into the relevant patch (commit 4f671d74).

Thanks!

ATB,
Ramsay Jones

  help.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/help.c b/help.c
index 71027b7..7881ab7 100644
--- a/help.c
+++ b/help.c
@@ -218,7 +218,7 @@ void list_commands(unsigned int colopts,
  	}
  }

-int cmd_group_cmp(const void *elem1, const void *elem2)
+static int cmd_group_cmp(const void *elem1, const void *elem2)
  {
  	const struct cmdname_help *e1 = elem1;
  	const struct cmdname_help *e2 = elem2;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help