]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Eliminate warnings that some function parameters are not used at
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Fri, 18 Dec 2009 17:11:02 +0000 (12:11 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Fri, 18 Dec 2009 17:11:02 +0000 (12:11 -0500)
libarchive/test/main.c.

SVN-Revision: 1763

libarchive/test/main.c

index 0c4e2f7749d0927a7b8d8f15870e4283facfc961..c7fd3a888ef4d704bd071a372c6b0dd681c2e450 100644 (file)
@@ -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) {