refs: mark a file-local symbol as static
PATCH 1/1 refs: mark a file-local symbol as static
---
Hi David,
No, you are not having flashbacks - you forgot to make the register_ref_storage_backend() function static. ;-)
BTW, I still have two symbols showing as exported but not used, namely:
$ diff nsc psc1
...
32a35,36Quoted 2 lines
refs.o -
resolve_ref_unsafe_submodulerefs/files-backend.o-do_for_each_per_worktree_ref
$
Both of these symbols are used by the lmdb backend, so I'm assuming that they are part of the 'refs API' and will (may?) be used by other alternate reference backends. Is that the case?
(I don't have the time right now to look at the code!)
Thanks!
ATB,
Ramsay Jones
refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
refs.c +1 -1
@@ -46,7 +46,7 @@ int ref_storage_backend_exists(const char *name)return 0 ; } -void register_ref_storage_backend (struct ref_storage_be *be) +static void register_ref_storage_backend (struct ref_storage_be *be) { be->next = refs_backends; refs_backends = be;
Signature · 1 line
2.7.0
Quoted 7 lines · Ramsay Jones
Signed-off-by Ramsay Jones <[email protected]>---
Hi David,
No, you are not having flashbacks - you forgot to make the
register_ref_storage_backend()function static. ;-)
Oops! Must have lost that in all of the rebasing! Will fix, thanks.
Quoted 8 lines
BTW, I still have two symbols showing as exported but not used, namely:
$ diff nsc psc1 ... 32a35,36Quoted 2 lines
refs.o -
resolve_ref_unsafe_submodulerefs/files-backend.o-do_for_each_per_worktree_ref
Quoted 7 lines
$Both of these symbols are used by the lmdb backend, so I'm assuming that
they are part of the 'refs API' and will (may?) be used by other alternate
reference backends. Is that the case?
Yes.