summaryrefslogtreecommitdiff
path: root/archivers/libarchive/files/tar/test/test_windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'archivers/libarchive/files/tar/test/test_windows.c')
-rw-r--r--archivers/libarchive/files/tar/test/test_windows.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/archivers/libarchive/files/tar/test/test_windows.c b/archivers/libarchive/files/tar/test/test_windows.c
index a2d0c214b95..1977ec644e6 100644
--- a/archivers/libarchive/files/tar/test/test_windows.c
+++ b/archivers/libarchive/files/tar/test/test_windows.c
@@ -25,6 +25,7 @@
#include "test.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
+#include <direct.h>
#include <windows.h>
static void
@@ -53,7 +54,7 @@ mkfullpath(char **path1, char **path2, const char *tpath, int type)
assert(NULL != fp1);
fp2 = malloc(l*2);
assert(NULL != fp2);
- l = GetFullPathNameA(tpath, l, fp1, NULL);
+ l = GetFullPathNameA(tpath, (DWORD)l, fp1, NULL);
if ((type & 0x01) == 0) {
for (p1 = fp1; *p1 != '\0'; p1++)
if (*p1 == '\\')
@@ -228,7 +229,7 @@ DEFINE_TEST(test_windows)
assertEqualInt(0,
systemf("%s -tf ../archive10.tar > ../list10", testprog));
/* Check drive letters have been stripped. */
- assertFileContents(fp2, strlen(fp2), "../list10");
+ assertFileContents(fp2, (int)strlen(fp2), "../list10");
free(fp1);
free(fp2);
@@ -240,7 +241,7 @@ DEFINE_TEST(test_windows)
assertEqualInt(0,
systemf("%s -tf ../archive11.tar > ../list11", testprog));
/* Check drive letters have been stripped. */
- assertFileContents(fp2, strlen(fp2), "../list11");
+ assertFileContents(fp2, (int)strlen(fp2), "../list11");
free(fp1);
free(fp2);
@@ -252,7 +253,7 @@ DEFINE_TEST(test_windows)
assertEqualInt(0,
systemf("%s -tf ../archive12.tar > ../list12", testprog));
/* Check drive letters have been stripped. */
- assertFileContents(fp2, strlen(fp2), "../list12");
+ assertFileContents(fp2, (int)strlen(fp2), "../list12");
free(fp1);
free(fp2);
@@ -264,7 +265,7 @@ DEFINE_TEST(test_windows)
assertEqualInt(0,
systemf("%s -tf ../archive13.tar > ../list13", testprog));
/* Check drive letters have been stripped. */
- assertFileContents(fp2, strlen(fp2), "../list13");
+ assertFileContents(fp2, (int)strlen(fp2), "../list13");
free(fp1);
free(fp2);
@@ -276,7 +277,7 @@ DEFINE_TEST(test_windows)
assertEqualInt(0,
systemf("%s -tf ../archive14.tar > ../list14", testprog));
/* Check drive letters have been stripped. */
- assertFileContents(fp2, strlen(fp2), "../list14");
+ assertFileContents(fp2, (int)strlen(fp2), "../list14");
free(fp1);
free(fp2);
@@ -288,7 +289,7 @@ DEFINE_TEST(test_windows)
assertEqualInt(0,
systemf("%s -tf ../archive15.tar > ../list15", testprog));
/* Check drive letters have been stripped. */
- assertFileContents(fp2, strlen(fp2), "../list15");
+ assertFileContents(fp2, (int)strlen(fp2), "../list15");
free(fp1);
free(fp2);
@@ -301,7 +302,7 @@ DEFINE_TEST(test_windows)
assertEqualInt(0,
systemf("%s -tf ../archive16.tar > ../list16", testprog));
/* Check drive letters have been stripped. */
- assertFileContents(fp2, strlen(fp2), "../list16");
+ assertFileContents(fp2, (int)strlen(fp2), "../list16");
free(fp1);
free(fp2);
@@ -314,7 +315,7 @@ DEFINE_TEST(test_windows)
assertEqualInt(0,
systemf("%s -tf ../archive17.tar > ../list17", testprog));
/* Check drive letters have been stripped. */
- assertFileContents(fp2, strlen(fp2), "../list17");
+ assertFileContents(fp2, (int)strlen(fp2), "../list17");
free(fp1);
free(fp2);
#else