[Openmp-commits] [openmp] eb12979 - [OpenMP] [Tests] Update test broken by #157364 (#158751)

via Openmp-commits openmp-commits at lists.llvm.org
Mon Sep 15 16:01:06 PDT 2025


Author: Sirraide
Date: 2025-09-15T23:01:01Z
New Revision: eb1297910e361628719c1c5d81e60ca4e32fb64f

URL: https://github.com/llvm/llvm-project/commit/eb1297910e361628719c1c5d81e60ca4e32fb64f
DIFF: https://github.com/llvm/llvm-project/commit/eb1297910e361628719c1c5d81e60ca4e32fb64f.diff

LOG: [OpenMP] [Tests] Update test broken by #157364 (#158751)

Fix another test impacted by #157364.

On Windows, `GetComputerNameA()`, which is what this ends up calling,
takes an `LPDWORD`, but we were handing it an `int*`; fix this by
declaring it as a `DWORD` instead.

Added: 
    

Modified: 
    openmp/runtime/test/affinity/format/fields_values.c

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/test/affinity/format/fields_values.c b/openmp/runtime/test/affinity/format/fields_values.c
index e7c1faf3e3c6f..b3cc4c32e77e8 100644
--- a/openmp/runtime/test/affinity/format/fields_values.c
+++ b/openmp/runtime/test/affinity/format/fields_values.c
@@ -112,8 +112,13 @@ void check_native_thread_id() {
 */
 
 void check_host() {
+#ifdef _WIN32
+  typedef DWORD buffer_size_t;
+#else
+  typedef int buffer_size_t;
+#endif
   int i;
-  int buffer_size = 256;
+  buffer_size_t buffer_size = 256;
   const char* formats[2] = {"%{host}", "%H"};
   char hostname[256];
   my_gethostname(hostname, buffer_size);


        


More information about the Openmp-commits mailing list