From: Eric Blake Date: Fri, 28 Aug 2009 17:03:05 +0000 (-0600) Subject: build: avoid unused variable warnings on cygwin X-Git-Tag: v7.6~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=359fa92f2a08991f261fad12b5a1809cff108e9b;p=platform%2Fupstream%2Fcoreutils.git build: avoid unused variable warnings on cygwin * src/copy.c (clone_file, copy_attr_by_fd, copy_attr_by_name): Mark up unused variables. * src/remove.c (dirent_inode_sort_may_be_useful): Likewise. --- diff --git a/src/copy.c b/src/copy.c index 238764a39..5f84f7e43 100644 --- a/src/copy.c +++ b/src/copy.c @@ -149,6 +149,8 @@ clone_file (int dest_fd, int src_fd) # define BTRFS_IOC_CLONE _IOW (BTRFS_IOCTL_MAGIC, 9, int) return ioctl (dest_fd, BTRFS_IOC_CLONE, src_fd); #else + (void) dest_fd; + (void) src_fd; errno = ENOTSUP; return -1; #endif @@ -251,15 +253,19 @@ copy_attr_by_name (char const *src_path, char const *dst_path, #else /* USE_XATTR */ static bool -copy_attr_by_fd (char const *src_path, int src_fd, - char const *dst_path, int dst_fd, const struct cp_options *x) +copy_attr_by_fd (char const *src_path ATTRIBUTE_UNUSED, + int src_fd ATTRIBUTE_UNUSED, + char const *dst_path ATTRIBUTE_UNUSED, + int dst_fd ATTRIBUTE_UNUSED, + const struct cp_options *x ATTRIBUTE_UNUSED) { return true; } static bool -copy_attr_by_name (char const *src_path, char const *dst_path, - const struct cp_options *x) +copy_attr_by_name (char const *src_path ATTRIBUTE_UNUSED, + char const *dst_path ATTRIBUTE_UNUSED, + const struct cp_options *x ATTRIBUTE_UNUSED) { return true; } diff --git a/src/remove.c b/src/remove.c index 6c8613bfa..2c4a178a1 100644 --- a/src/remove.c +++ b/src/remove.c @@ -1311,7 +1311,10 @@ dirent_inode_sort_may_be_useful (int dir_fd) } } # else /* !HAVE_STRUCT_STATFS_F_TYPE */ -static bool dirent_inode_sort_may_be_useful (int dir_fd) { return true; } +static bool dirent_inode_sort_may_be_useful (int dir_fd ATTRIBUTE_UNUSED) +{ + return true; +} # endif /* !HAVE_STRUCT_STATFS_F_TYPE */ #endif /* HAVE_STRUCT_DIRENT_D_TYPE */