[Libreoffice-commits] core.git: opencl/opencltest

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 18 11:14:58 UTC 2019


 opencl/opencltest/main.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 34545c3648f72bf655623139e5fcc981ea1fd5a6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 18 10:01:13 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jul 18 13:13:52 2019 +0200

    cid#1448546 Logically dead code
    
    Change-Id: I7013e5ef67ae58c42886a4ba6ea0c9a47074ac8e
    Reviewed-on: https://gerrit.libreoffice.org/75834
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/opencl/opencltest/main.cxx b/opencl/opencltest/main.cxx
index 0b1292e3e7a3..a499032f8c05 100644
--- a/opencl/opencltest/main.cxx
+++ b/opencl/opencltest/main.cxx
@@ -110,9 +110,9 @@ static void runTest(const char* deviceName, const char* devicePlatform)
     cl_program program = clCreateProgramWithSource(context, 1, source, sourceSize, &state);
     openclcheck(state);
     state = clBuildProgram(program, 1, &deviceId, nullptr, nullptr, nullptr);
+#ifdef DBG_UTIL
     if (state != CL_SUCCESS)
     {
-#ifdef DBG_UTIL
         size_t length;
         status
             = clGetProgramBuildInfo(program, deviceId, CL_PROGRAM_BUILD_LOG, 0, nullptr, &length);
@@ -122,10 +122,9 @@ static void runTest(const char* deviceName, const char* devicePlatform)
         error[length] = '\0';
         cerr << "OpenCL driver check build error:" << error.data() << endl;
         abort();
-#else
-        openclcheck(state);
-#endif
     }
+#endif
+    openclcheck(state);
     cl_kernel kernel = clCreateKernel(program, "testFunction", &state);
     openclcheck(state);
 


More information about the Libreoffice-commits mailing list