]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Eliminate the warnings which Borland C Compiler complains about unused parameter.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 21 Dec 2009 03:44:11 +0000 (22:44 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 21 Dec 2009 03:44:11 +0000 (22:44 -0500)
SVN-Revision: 1768

cpio/test/main.c
tar/test/main.c

index f40f38db0fa86c69a109149bed2d94bef5b7ecee..36f466af9b2f1f9d17e0b482c8e0ba4ab51f7967 100644 (file)
@@ -1117,6 +1117,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) {
@@ -1152,6 +1155,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)) {
@@ -1181,6 +1187,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
@@ -1240,6 +1248,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
@@ -1259,6 +1268,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) {
index cbf453c56b44de4d78e73358bb5802be7d235857..b2d34fa1a8e71bcfe4890b87646c56b386de654b 100644 (file)
@@ -1118,6 +1118,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) {
@@ -1153,6 +1156,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)) {
@@ -1182,6 +1188,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
@@ -1241,6 +1249,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
@@ -1260,6 +1269,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) {