[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] [PATCH] xattr: fix compilation failure with -Werror
From: |
Stefano Lattarini |
Subject: |
[Bug-tar] [PATCH] xattr: fix compilation failure with -Werror |
Date: |
Wed, 24 Apr 2013 11:17:54 +0200 |
Without this change, building from the bootstrapped Git repository
with GCC (4.7.2) fails like this:
xattrs.c:488:1: error: ‘xattrs__fd_set’ defined but not used \
[-Werror=unused-function]
cc1: all warnings being treated as errors
Makefile:1305: recipe for target 'xattrs.o' failed
src/xattrs.c (xattrs__fd_set): Define this static function only if
the 'HAVE_XATTRS' preprocessor conditional is true.
Signed-off-by: Stefano Lattarini <address@hidden>
---
src/xattrs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/xattrs.c b/src/xattrs.c
index 4440b34..dac15f3 100644
--- a/src/xattrs.c
+++ b/src/xattrs.c
@@ -484,6 +484,7 @@ xattrs_xattrs_get (int parentfd, char const *file_name,
}
}
+#ifdef HAVE_XATTRS
static void
xattrs__fd_set (struct tar_stat_info const *st,
char const *file_name, char typeflag,
@@ -509,6 +510,7 @@ xattrs__fd_set (struct tar_stat_info const *st,
sysname, attr, file_name));
}
}
+#endif
/* lgetfileconat is called against FILE_NAME iff the FD parameter is set to
zero, otherwise the fgetfileconat is used against correct file descriptor */
--
1.8.2.1.610.g562af5b
- [Bug-tar] [PATCH] xattr: fix compilation failure with -Werror,
Stefano Lattarini <=