[Openmp-commits] [PATCH] D108196: [OpenMP] Fix the usage of sscanf on MinGW

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 17 11:36:53 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf5616a981c60: [OpenMP] Fix the usage of sscanf on MinGW (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108196

Files:
  openmp/runtime/src/kmp_settings.cpp


Index: openmp/runtime/src/kmp_settings.cpp
===================================================================
--- openmp/runtime/src/kmp_settings.cpp
+++ openmp/runtime/src/kmp_settings.cpp
@@ -164,7 +164,7 @@
     return (INT_MAX);
   value = (double)0.0;
   mult = '\0';
-#if KMP_OS_WINDOWS
+#if KMP_OS_WINDOWS && KMP_MSVC_COMPAT
   // On Windows, each %c parameter needs additional size parameter for sscanf_s
   nvalues = KMP_SSCANF(data, "%lf%c%c", &value, &mult, 1, &extra, 1);
 #else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108196.366969.patch
Type: text/x-patch
Size: 492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210817/6ea1e30d/attachment.bin>


More information about the Openmp-commits mailing list