loader: Fix unused variable warning on Apple
authorCharles Giessen <charles@lunarg.com>
Fri, 23 Apr 2021 20:04:38 +0000 (14:04 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Fri, 23 Apr 2021 21:21:07 +0000 (15:21 -0600)
loader/loader.c

index 66fcdca..2a9fe88 100644 (file)
@@ -267,7 +267,6 @@ static inline char *loader_getenv(const char *name, const struct loader_instance
 }
 
 static inline char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
-    char *out;
 #if defined(__APPLE__)
     // Apple does not appear to have a secure getenv implementation.
     // The main difference between secure getenv and getenv is that secure getenv
@@ -280,7 +279,8 @@ static inline char *loader_secure_getenv(const char *name, const struct loader_i
 #elif defined(__Fuchsia__)
     return loader_getenv(name, inst);
 #else
-// Linux
+    // Linux
+    char *out;
 #if defined(HAVE_SECURE_GETENV) && !defined(USE_UNSAFE_FILE_SEARCH)
     (void)inst;
     out = secure_getenv(name);