From: Charles Wilson Date: Thu, 10 Sep 2009 18:17:34 +0000 (-0400) Subject: Fix compiler warnings on MinGW with gcc-4.4.0 X-Git-Tag: v2.8.0~358 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56488a2733d2ac64c319932e69576f44b5a7558a;p=thirdparty%2Flibarchive.git Fix compiler warnings on MinGW with gcc-4.4.0 * tar/test/main.c (assertion_file_time): Silence 'var may be used uninitialized' warning. * cpio/test/main.c (assertion_file_time): Silence 'var may be used uninitialized' warning. * libarchive/test/main.c: Don't re-#define chdir. (assertion_file_time): Silence 'var may be used uninitialized' warning. SVN-Revision: 1450 --- diff --git a/cpio/test/main.c b/cpio/test/main.c index fc957cb79..e8371b05a 100644 --- a/cpio/test/main.c +++ b/cpio/test/main.c @@ -838,6 +838,8 @@ assertion_file_time(const char *file, int line, FILETIME ftime, fbirthtime, fatime, fmtime; ULARGE_INTEGER wintm; HANDLE h; + ftime.dwLowDateTime = 0; + ftime.dwHighDateTime = 0; assertion_count(file, line); h = CreateFile(pathname, FILE_READ_ATTRIBUTES, 0, NULL, diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 2248b375b..296e3f56f 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -837,6 +837,8 @@ assertion_file_time(const char *file, int line, FILETIME ftime, fbirthtime, fatime, fmtime; ULARGE_INTEGER wintm; HANDLE h; + ftime.dwLowDateTime = 0; + ftime.dwHighDateTime = 0; assertion_count(file, line); h = CreateFile(pathname, FILE_READ_ATTRIBUTES, 0, NULL, diff --git a/tar/test/main.c b/tar/test/main.c index 88d14a5f1..b955b33d6 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -80,7 +80,6 @@ __FBSDID("$FreeBSD: src/usr.bin/tar/test/main.c,v 1.6 2008/11/05 06:40:53 kientz #define S_ISREG(m) ((m) & _S_IFREG) #endif #define access _access -#define chdir _chdir #ifndef fileno #define fileno _fileno #endif @@ -838,6 +837,8 @@ assertion_file_time(const char *file, int line, FILETIME ftime, fbirthtime, fatime, fmtime; ULARGE_INTEGER wintm; HANDLE h; + ftime.dwLowDateTime = 0; + ftime.dwHighDateTime = 0; assertion_count(file, line); h = CreateFile(pathname, FILE_READ_ATTRIBUTES, 0, NULL,