diff --git a/test_conformance/printf/CMakeLists.txt b/test_conformance/printf/CMakeLists.txt index 914ffb58..a5c23bcb 100644 --- a/test_conformance/printf/CMakeLists.txt +++ b/test_conformance/printf/CMakeLists.txt @@ -1,5 +1,7 @@ set(MODULE_NAME PRINTF) +set(CMAKE_CXX_STANDARD 11) + set(${MODULE_NAME}_SOURCES test_printf.c util_printf.c diff --git a/test_conformance/printf/test_printf.c b/test_conformance/printf/test_printf.c index 15e6d41d..fc89b744 100644 --- a/test_conformance/printf/test_printf.c +++ b/test_conformance/printf/test_printf.c @@ -409,6 +409,7 @@ static int doTest(cl_command_queue queue, cl_context context, const unsigned int char _analysisBuffer[ANALYSIS_BUFFER_SIZE]; cl_uint out32 = 0; cl_ulong out64 = 0; + int fd = -1; // Define an index space (global work size) of threads for execution. size_t globalWorkSize[1]; @@ -455,7 +456,7 @@ static int doTest(cl_command_queue queue, cl_context context, const unsigned int } } - int fd = acquireOutputStream(); + fd = acquireOutputStream(); globalWorkSize[0] = 1; cl_event ndrEvt; err = clEnqueueNDRangeKernel(queue, kernel, 1, NULL, globalWorkSize, NULL, 0, NULL,&ndrEvt);