[Openmp-commits] [PATCH] D137747: [openmp] [test] Fix warnings about printf format mismatches on Windows

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 17 22:52:58 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa6440b0fc535: [openmp] [test] Fix warnings about printf format mismatches on Windows (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137747/new/

https://reviews.llvm.org/D137747

Files:
  openmp/runtime/test/omp_testsuite.h


Index: openmp/runtime/test/omp_testsuite.h
===================================================================
--- openmp/runtime/test/omp_testsuite.h
+++ openmp/runtime/test/omp_testsuite.h
@@ -104,7 +104,8 @@
   info->arg = arg;
   pthread = CreateThread(NULL, 0, __thread_func_wrapper, info, 0, NULL);
   if (pthread == NULL) {
-    fprintf(stderr, "CreateThread() failed: Error #%u.\n", GetLastError());
+    fprintf(stderr, "CreateThread() failed: Error #%u.\n",
+            (unsigned) GetLastError());
     exit(1);
   }
   *thread = pthread;
@@ -116,12 +117,13 @@
   rc = WaitForSingleObject(thread, INFINITE);
   if (rc == WAIT_FAILED) {
     fprintf(stderr, "WaitForSingleObject() failed: Error #%u.\n",
-            GetLastError());
+            (unsigned) GetLastError());
     exit(1);
   }
   rc = CloseHandle(thread);
   if (rc == 0) {
-    fprintf(stderr, "CloseHandle() failed: Error #%u.\n", GetLastError());
+    fprintf(stderr, "CloseHandle() failed: Error #%u.\n",
+            (unsigned) GetLastError());
     exit(1);
   }
   return 0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137747.476343.patch
Type: text/x-patch
Size: 1059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221118/a2283833/attachment-0001.bin>


More information about the Openmp-commits mailing list