1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 11:06:10 +02:00

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>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2017-05-08 17:40:37 +07:00 committed by Junio C Hamano
parent e9d983f116
commit 382fb07f7b
2 changed files with 5 additions and 7 deletions

View File

@ -1100,8 +1100,6 @@ int remove_or_warn(unsigned int mode, const char *path);
int access_or_warn(const char *path, int mode, unsigned flag);
int access_or_die(const char *path, int mode, unsigned flag);
/* Warn on an inaccessible file that ought to be accessible */
void warn_on_inaccessible(const char *path);
/* Warn on an inaccessible file if errno indicates this is an error */
int warn_on_fopen_errors(const char *path);

View File

@ -418,6 +418,11 @@ FILE *fopen_for_writing(const char *path)
return ret;
}
static void warn_on_inaccessible(const char *path)
{
warning_errno(_("unable to access '%s'"), path);
}
int warn_on_fopen_errors(const char *path)
{
if (errno != ENOENT && errno != ENOTDIR) {
@ -597,11 +602,6 @@ int remove_or_warn(unsigned int mode, const char *file)
return S_ISGITLINK(mode) ? rmdir_or_warn(file) : unlink_or_warn(file);
}
void warn_on_inaccessible(const char *path)
{
warning_errno(_("unable to access '%s'"), path);
}
static int access_error_is_ok(int err, unsigned flag)
{
return err == ENOENT || err == ENOTDIR ||