From 4390f15652fde7e58b959c2aaf31852f897a2bf7 Mon Sep 17 00:00:00 2001 From: Michihiro NAKAJIMA Date: Fri, 18 Dec 2009 12:11:02 -0500 Subject: [PATCH] Eliminate warnings that some function parameters are not used at libarchive/test/main.c. SVN-Revision: 1763 --- libarchive/test/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 0c4e2f774..c7fd3a888 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -1113,6 +1113,9 @@ assertion_is_dir(const char *file, int line, const char *pathname, int mode) struct stat st; int r; +#if defined(_WIN32) && !defined(__CYGWIN__) + (void)mode; /* UNUSED */ +#endif assertion_count(file, line); r = lstat(pathname, &st); if (r != 0) { @@ -1148,6 +1151,9 @@ assertion_is_reg(const char *file, int line, const char *pathname, int mode) struct stat st; int r; +#if defined(_WIN32) && !defined(__CYGWIN__) + (void)mode; /* UNUSED */ +#endif assertion_count(file, line); r = lstat(pathname, &st); if (r != 0 || !S_ISREG(st.st_mode)) { @@ -1177,6 +1183,8 @@ is_symlink(const char *file, int line, const char *pathname, const char *contents) { #if defined(_WIN32) && !defined(__CYGWIN__) + (void)pathname; /* UNUSED */ + (void)contents; /* UNUSED */ assertion_count(file, line); /* Windows sort-of has real symlinks, but they're only usable * by privileged users and are crippled even then, so there's @@ -1236,6 +1244,7 @@ assertion_make_dir(const char *file, int line, const char *dirname, int mode) { assertion_count(file, line); #if defined(_WIN32) && !defined(__CYGWIN__) + (void)mode; /* UNUSED */ if (0 == _mkdir(dirname)) return (1); #else @@ -1255,6 +1264,7 @@ assertion_make_file(const char *file, int line, #if defined(_WIN32) && !defined(__CYGWIN__) /* TODO: Rework this to set file mode as well. */ FILE *f; + (void)mode; /* UNUSED */ assertion_count(file, line); f = fopen(path, "wb"); if (f == NULL) { -- 2.47.3