Move variable declarations out of #if guard, NFC
authorKrzysztof Parzyszek <kparzysz@quicinc.com>
Sat, 12 Nov 2022 23:27:59 +0000 (17:27 -0600)
committerKrzysztof Parzyszek <kparzysz@quicinc.com>
Sun, 13 Nov 2022 18:54:03 +0000 (12:54 -0600)
They are used in other sides of the #if/#else.

openmp/runtime/src/z_Linux_util.cpp

index 21771e6..7aa704b 100644 (file)
@@ -131,13 +131,14 @@ void __kmp_affinity_determine_capable(const char *env_var) {
 #define KMP_CPU_SET_SIZE_LIMIT (sizeof(cpuset_t))
 #endif
 
+  int verbose = __kmp_affinity.flags.verbose;
+  int warnings = __kmp_affinity.flags.warnings;
+  enum affinity_type type = __kmp_affinity.type;
+
 #if KMP_OS_LINUX
   long gCode;
   unsigned char *buf;
   buf = (unsigned char *)KMP_INTERNAL_MALLOC(KMP_CPU_SET_SIZE_LIMIT);
-  int verbose = __kmp_affinity.flags.verbose;
-  int warnings = __kmp_affinity.flags.warnings;
-  enum affinity_type type = __kmp_affinity.type;
 
   // If the syscall returns a suggestion for the size,
   // then we don't have to search for an appropriate size.