From fb36aeb181cb93d470c8e8c4d48a784d40bd130f Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 10 Jun 2019 22:55:11 +0200 Subject: [PATCH] Remove now unused x_fstat function --- src/ccache.h | 1 - src/util.c | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/src/ccache.h b/src/ccache.h index 4ab060868..1de15b5e2 100644 --- a/src/ccache.h +++ b/src/ccache.h @@ -167,7 +167,6 @@ void *x_calloc(size_t nmemb, size_t size); void *x_realloc(void *ptr, size_t size); void x_setenv(const char *name, const char *value); void x_unsetenv(const char *name); -int x_fstat(int fd, struct stat *buf); int x_lstat(const char *pathname, struct stat *buf); int x_stat(const char *pathname, struct stat *buf); void traverse(const char *dir, void (*fn)(const char *, struct stat *)); diff --git a/src/util.c b/src/util.c index b55b84ba2..af9f56387 100644 --- a/src/util.c +++ b/src/util.c @@ -678,17 +678,6 @@ void x_unsetenv(const char *name) #endif } -// Like fstat() but also call cc_log on failure. -int -x_fstat(int fd, struct stat *buf) -{ - int result = fstat(fd, buf); - if (result != 0) { - cc_log("Failed to fstat fd %d: %s", fd, strerror(errno)); - } - return result; -} - // Like lstat() but also call cc_log on failure. int x_lstat(const char *pathname, struct stat *buf) -- 2.47.2