path.c: make 'common_list' a file local symbol
PATCH 1/1 path.c: make 'common_list' a file local symbol
Commit 04afda89 ("refs: clean up common_list", 26-08-2015) changed the type of the 'common_list' symbol from an array of 'formatted' strings to an array of struct containing the same data. However, in addition it also (inadvertently) changed the visibility of the symbol from file local to external.
In order to revert the visibility of the symbol to file local, add the static modifier to the declaration of 'common_list'.
Noticed by sparse (symbol 'common_list' was not declared. Should it be static?).
---
Hi David,
If you need to re-roll the patches on your 'dt/refs-bisection' branch, could you please squash this into the relevant patch.
Thanks!
ATB,
Ramsay Jones
path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
path.c +1 -1
@@ -100,7 +100,7 @@ struct common_dir {const char *dirname; }; -struct common_dir common_list[] = { +static struct common_dir common_list[] = { {0 ,1 ,0 ,"branches" }, {0 ,1 ,0 ,"hooks" }, {0 ,1 ,0 ,"info" },
Signature · 1 line
2.5.0
Quoted 13 lines · Ramsay Jones
Commit
04afda89("refs: clean upcommon_list", 26-08-2015) changed the type of the 'common_list' symbol from an array of 'formatted' strings to an array of struct containing the same data. However, in addition it also (inadvertently) changed the visibility of the symbol from file local to external.In order to revert the visibility of the symbol to file local, add the static modifier to the declaration of '
common_list'.Noticed by sparse (symbol '
common_list' was not declared. Should it be static?).Signed-off-by Ramsay Jones <[email protected]>
Quoted 8 lines
---
Hi David,
If you need to re-roll the patches on your 'dt/refs-bisection' branch, could you please squash this into the relevant patch.
Thanks!
Thanks. I've squashed this into David's [v5 1/3] while queuing.
Quoted 20 lines
ATB,
Ramsay Jonespath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)path.c +1
-1@@ -100,7 +100,7 @@ struct common_dir {const char *dirname; }; -struct common_dir common_list[] = { +static struct common_dir common_list[] = { {0 ,1 ,0 ,"branches" }, {0 ,1 ,0 ,"hooks" }, {0 ,1 ,0 ,"info" },