wrapper.c: make warn_on_inaccessible() static

After the last patch, this function is not used outside anymore. Keep it static. Noticed-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed May 8, 2017 at 17:40 UTC 382fb07f7bbb1f94fa3e1293d5df151725a886a3
2 files changed +5 -7
git-compat-util.h
-2
@@ -1100,8 +1100,6 @@ int remove_or_warn(unsigned int mode, const char *path);
1100 int access_or_warn(const char *path, int mode, unsigned flag);
1101 int access_or_die(const char *path, int mode, unsigned flag);
1102
1103 -/* Warn on an inaccessible file that ought to be accessible */
1104 -void warn_on_inaccessible(const char *path);
1103 /* Warn on an inaccessible file if errno indicates this is an error */
1104 int warn_on_fopen_errors(const char *path);
1105
wrapper.c
+5 -5
@@ -418,6 +418,11 @@ FILE *fopen_for_writing(const char *path)
418 return ret;
419 }
420
421 +static void warn_on_inaccessible(const char *path)
422 +{
423 + warning_errno(_("unable to access '%s'"), path);
424 +}
425 +
426 int warn_on_fopen_errors(const char *path)
427 {
428 if (errno != ENOENT && errno != ENOTDIR) {
@@ -597,11 +602,6 @@ int remove_or_warn(unsigned int mode, const char *file)
602 return S_ISGITLINK(mode) ? rmdir_or_warn(file) : unlink_or_warn(file);
603 }
604
600 -void warn_on_inaccessible(const char *path)
601 -{
602 - warning_errno(_("unable to access '%s'"), path);
603 -}
604 -
605 static int access_error_is_ok(int err, unsigned flag)
606 {
607 return err == ENOENT || err == ENOTDIR ||