* [PATCH] path.c: make 'common_list' a file local symbol
@ 2015-09-01 15:54 Ramsay Jones
2015-09-01 18:06 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2015-09-01 15:54 UTC (permalink / raw)
To: David Turner; +Cc: Junio C Hamano, GIT Mailing-list
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?).
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
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(-)
diff --git a/path.c b/path.c
index 9d32d19..a80eaf7 100644
--- a/path.c
+++ b/path.c
@@ -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" },
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] path.c: make 'common_list' a file local symbol
2015-09-01 15:54 [PATCH] path.c: make 'common_list' a file local symbol Ramsay Jones
@ 2015-09-01 18:06 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2015-09-01 18:06 UTC (permalink / raw)
To: Ramsay Jones; +Cc: David Turner, GIT Mailing-list
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 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?).
>
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> 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.
>
> ATB,
> Ramsay Jones
>
> path.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/path.c b/path.c
> index 9d32d19..a80eaf7 100644
> --- a/path.c
> +++ b/path.c
> @@ -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" },
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-01 18:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-01 15:54 [PATCH] path.c: make 'common_list' a file local symbol Ramsay Jones
2015-09-01 18:06 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.