Whamcloud - gitweb
AOSP: Android: stop suppressing warnings controlled by -Wall
[tools/e2fsprogs.git] / lib / uuid / tst_uuid.c
index 33fb80b..c1c2901 100644 (file)
 
 #include "config.h"
 
-#ifdef _WIN32
-#define _WIN32_WINNT 0x0500
-#include <windows.h>
-#define UUID MYUUID
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -144,7 +138,8 @@ main(int argc ATTR((unused)) , char **argv ATTR((unused)))
        tv.tv_usec = 0;
        time_reg = uuid_time(buf, &tv);
        printf("UUID generated at %lu reports %lu (%ld.%ld)\n",
-              time_gen, time_reg, tv.tv_sec, (long)tv.tv_usec);
+              (unsigned long)time_gen, (unsigned long)time_reg,
+              (long)tv.tv_sec, (long)tv.tv_usec);
        /* allow 1s margin in case of rollover between sampling
         * the current time and when the UUID is generated. */
        if (time_reg > time_gen + 1) {
@@ -154,7 +149,10 @@ main(int argc ATTR((unused)) , char **argv ATTR((unused)))
                printf("UUID time comparison succeeded.\n");
        }
 
-       uuid_parse(str, tst);
+       if (uuid_parse(str, tst) < 0) {
+               printf("UUID parse failed\n");
+               failed++;
+       }
        if (!uuid_compare(buf, tst)) {
                printf("UUID parse and compare succeeded.\n");
        } else {