diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-02-10 00:56:49 +0900 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-02-10 01:26:49 +0900 |
commit | d2d75ef8cb78ac1a5382f4d945a974fd7562fde6 (patch) | |
tree | 7bd484fd181c2ab03428a4415ab95360c9540701 /tar | |
parent | 82d66e035dbba623c0f2c88b6351b7649c93f986 (diff) | |
download | libarchive-d2d75ef8cb78ac1a5382f4d945a974fd7562fde6.tar.gz |
Fix build failure in aggressive warnings
Diffstat (limited to 'tar')
-rw-r--r-- | tar/test/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tar/test/main.c b/tar/test/main.c index e066f559..da49c725 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -1329,7 +1329,7 @@ assertion_file_nlinks(const char *file, int line, assertion_count(file, line); r = lstat(pathname, &st); - if (r == 0 && st.st_nlink == nlinks) + if (r == 0 && (int)st.st_nlink == nlinks) return (1); failure_start(file, line, "File %s has %d links, expected %d", pathname, st.st_nlink, nlinks); @@ -1393,7 +1393,7 @@ assertion_is_dir(const char *file, int line, const char *pathname, int mode) /* Windows doesn't handle permissions the same way as POSIX, * so just ignore the mode tests. */ /* TODO: Can we do better here? */ - if (mode >= 0 && mode != (st.st_mode & 07777)) { + if (mode >= 0 && (mode_t)mode != (st.st_mode & 07777)) { failure_start(file, line, "Dir %s has wrong mode", pathname); logprintf(" Expected: 0%3o\n", mode); logprintf(" Found: 0%3o\n", st.st_mode & 07777); @@ -1426,7 +1426,7 @@ assertion_is_reg(const char *file, int line, const char *pathname, int mode) /* Windows doesn't handle permissions the same way as POSIX, * so just ignore the mode tests. */ /* TODO: Can we do better here? */ - if (mode >= 0 && mode != (st.st_mode & 07777)) { + if (mode >= 0 && (mode_t)mode != (st.st_mode & 07777)) { failure_start(file, line, "File %s has wrong mode", pathname); logprintf(" Expected: 0%3o\n", mode); logprintf(" Found: 0%3o\n", st.st_mode & 07777); |