]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Build fix & slight increase in -v detail.
authorTim Kientzle <kientzle@gmail.com>
Sun, 6 Sep 2009 18:13:36 +0000 (14:13 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sun, 6 Sep 2009 18:13:36 +0000 (14:13 -0400)
SVN-Revision: 1434

libarchive/test/main.c

index 155d2c53c7fae9013da85f623e77efcb29270394..bb506341fa1ce16c467d8e4f2c26c5e306d247ba 100644 (file)
@@ -244,6 +244,8 @@ static struct line {
 static void
 failure_start(const char *filename, int line, const char *fmt, ...)
 {
+       va_list ap;
+
        /* Record another failure for this line. */
        ++failures;
        test_filename = filename;
@@ -262,10 +264,9 @@ failure_start(const char *filename, int line, const char *fmt, ...)
        }
 
        /* Log file:line header for this failure */
-       va_list ap;
        va_start(ap, fmt);
 #if _MSC_VER
-       logprintf("%s (%d): ", filename, line);
+       logprintf("%s(%d): ", filename, line);
 #else
        logprintf("%s:%d: ", filename, line);
 #endif
@@ -273,14 +274,14 @@ failure_start(const char *filename, int line, const char *fmt, ...)
        va_end(ap);
        logprintf("\n");
 
-       /* Determine whether to log details to console. */
-       if (verbosity == VERBOSITY_LIGHT_REPORT)
-               log_console = 0;
-
        if (msg != NULL && msg[0] != '\0') {
                logprintf("   Description: %s\n", msg);
                msg = NULL;
        }
+
+       /* Determine whether to log details to console. */
+       if (verbosity == VERBOSITY_LIGHT_REPORT)
+               log_console = 0;
 }
 
 /* Complete reporting of failed tests. */
@@ -815,7 +816,7 @@ static int
 assertion_file_time(const char *file, int line,
     const char *pathname, long t, long nsec, char type, int recent)
 {
-       long filet, filet_nsec;
+       long long filet, filet_nsec;
        int r;
 
 #if defined(_WIN32) && !defined(__CYGWIN__)