* [PATCH] dir.c: mark a file local function as static
@ 2014-10-30 16:01 Ramsay Jones
0 siblings, 0 replies; only message in thread
From: Ramsay Jones @ 2014-10-30 16:01 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy; +Cc: Junio C Hamano, GIT Mailing-list
Commit b74884b86 ("untracked cache: make a wrapper around
{open,read,close}dir()", 27-10-2014) added the read_cached_dir()
function as an external symbol.
Noticed by sparse. ("'read_cached_dir' was not declared. Should it
be static?").
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Duy,
If you need to re-roll your 'nd/untracked-cache' branch, could you
please squash this into the relevant patch.
Thanks!
[If this function is destined to be used from external call sites
in future patches, then adding an extern declaration to "dir.h"
would be an alternative, of course. ;-) ]
ATB,
Ramsay Jones
dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dir.c b/dir.c
index 0040ca1..e999cc8 100644
--- a/dir.c
+++ b/dir.c
@@ -1582,7 +1582,7 @@ static int open_cached_dir(struct cached_dir *cdir,
return 0;
}
-int read_cached_dir(struct cached_dir *cdir)
+static int read_cached_dir(struct cached_dir *cdir)
{
if (cdir->fdir) {
cdir->de = readdir(cdir->fdir);
--
2.1.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-30 16:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-30 16:01 [PATCH] dir.c: mark a file local function as static Ramsay Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).