{"thread":{"id":"37846","subject":"[PATCH] dir.c: mark a file local function as static","startedAt":"2014-10-30T16:01:46Z","lastAt":"2014-10-30T16:01:46Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"251219","messageId":"545260EA.7050903@ramsay1.demon.co.uk","threadId":"37846","inReplyTo":null,"subject":"[PATCH] dir.c: mark a file local function as static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2014-10-30T16:01:46Z","receivedAt":"2014-10-30T16:01:46Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommit b74884b86 (\"untracked cache: make a wrapper around\n{open,read,close}dir()\", 27-10-2014) added the read_cached_dir()\nfunction as an external symbol.\n\nNoticed by sparse. (\"'read_cached_dir' was not declared. Should it\nbe static?\").\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Duy,\n\nIf you need to re-roll your 'nd/untracked-cache' branch, could you\nplease squash this into the relevant patch.\n\nThanks!\n\n[If this function is destined to be used from external call sites\nin future patches, then adding an extern declaration to \"dir.h\"\nwould be an alternative, of course. ;-) ]\n\nATB,\nRamsay Jones\n\n\n dir.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/dir.c b/dir.c\nindex 0040ca1..e999cc8 100644\n--- a/dir.c\n+++ b/dir.c\n@@ -1582,7 +1582,7 @@ static int open_cached_dir(struct cached_dir *cdir,\n \treturn 0;\n }\n \n-int read_cached_dir(struct cached_dir *cdir)\n+static int read_cached_dir(struct cached_dir *cdir)\n {\n \tif (cdir->fdir) {\n \t\tcdir->de = readdir(cdir->fdir);\n-- \n2.1.0\n"}]}