From: Michihiro NAKAJIMA Date: Mon, 21 Dec 2009 03:44:11 +0000 (-0500) Subject: Eliminate the warnings which Borland C Compiler complains about unused parameter. X-Git-Tag: v2.8.0~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=47c43d5c72ab3b220bb61b6fd0f35d1ee9ab204f;p=thirdparty%2Flibarchive.git Eliminate the warnings which Borland C Compiler complains about unused parameter. SVN-Revision: 1768 --- diff --git a/cpio/test/main.c b/cpio/test/main.c index f40f38db0..36f466af9 100644 --- a/cpio/test/main.c +++ b/cpio/test/main.c @@ -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) { diff --git a/tar/test/main.c b/tar/test/main.c index cbf453c56..b2d34fa1a 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -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) {