Skip to content

Commit 382fb07

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9d983f commit 382fb07

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

git-compat-util.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,6 @@ int remove_or_warn(unsigned int mode, const char *path);
11001100
int access_or_warn(const char *path, int mode, unsigned flag);
11011101
int access_or_die(const char *path, int mode, unsigned flag);
11021102

1103-
/* Warn on an inaccessible file that ought to be accessible */
1104-
void warn_on_inaccessible(const char *path);
11051103
/* Warn on an inaccessible file if errno indicates this is an error */
11061104
int warn_on_fopen_errors(const char *path);
11071105

wrapper.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,11 @@ FILE *fopen_for_writing(const char *path)
418418
return ret;
419419
}
420420

421+
static void warn_on_inaccessible(const char *path)
422+
{
423+
warning_errno(_("unable to access '%s'"), path);
424+
}
425+
421426
int warn_on_fopen_errors(const char *path)
422427
{
423428
if (errno != ENOENT && errno != ENOTDIR) {
@@ -597,11 +602,6 @@ int remove_or_warn(unsigned int mode, const char *file)
597602
return S_ISGITLINK(mode) ? rmdir_or_warn(file) : unlink_or_warn(file);
598603
}
599604

600-
void warn_on_inaccessible(const char *path)
601-
{
602-
warning_errno(_("unable to access '%s'"), path);
603-
}
604-
605605
static int access_error_is_ok(int err, unsigned flag)
606606
{
607607
return err == ENOENT || err == ENOTDIR ||

0 commit comments

Comments
 (0)