fix compilation with VS2010
authorMichael Eiler <michael.eiler@tum.de>
Wed, 19 Apr 2017 05:42:46 +0000 (07:42 +0200)
committerBen Ashbaugh <ben.ashbaugh@intel.com>
Wed, 10 Apr 2019 17:36:04 +0000 (10:36 -0700)
icd.c

diff --git a/icd.c b/icd.c
index 1f23fbf..8e142c4 100644 (file)
--- a/icd.c
+++ b/icd.c
@@ -193,17 +193,18 @@ void khrIcdContextPropertiesGetPlatform(const cl_context_properties *properties,
     if (properties == NULL && khrIcdVendors != NULL)
     {
         *outPlatform = khrIcdVendors[0].platform;
-        return;
     }
-
-    const cl_context_properties *property = (cl_context_properties *)NULL;
-    *outPlatform = NULL;
-    for (property = properties; property && property[0]; property += 2)
+    else
     {
-        if ((cl_context_properties)CL_CONTEXT_PLATFORM == property[0])
+        const cl_context_properties *property = (cl_context_properties *)NULL;
+        *outPlatform = NULL;
+        for (property = properties; property && property[0]; property += 2)
         {
-            *outPlatform = (cl_platform_id)property[1];
-        }    
+            if ((cl_context_properties)CL_CONTEXT_PLATFORM == property[0])
+            {
+                *outPlatform = (cl_platform_id)property[1];
+            }
+        }
     }
 }