From d18253fe33b94ca904f448b5a03aae8942de3ab0 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Wed, 26 May 2010 22:40:06 +0000 Subject: [PATCH] Don't assume writeable C strings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5508 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/OpenCL.cpp | 4 ++-- Source/Core/Common/Src/OpenCL.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Common/Src/OpenCL.cpp b/Source/Core/Common/Src/OpenCL.cpp index e261ada5cf..f89c5f4131 100644 --- a/Source/Core/Common/Src/OpenCL.cpp +++ b/Source/Core/Common/Src/OpenCL.cpp @@ -187,11 +187,11 @@ void Destroy() #endif } -void HandleCLError(cl_int error, char* str) +void HandleCLError(cl_int error, const char* str) { #if defined(HAVE_OPENCL) && HAVE_OPENCL - char* name; + const char* name; switch(error) { #define CL_ERROR(x) case (x): name = #x; break diff --git a/Source/Core/Common/Src/OpenCL.h b/Source/Core/Common/Src/OpenCL.h index faf9dcf0b4..977b0bc4f7 100644 --- a/Source/Core/Common/Src/OpenCL.h +++ b/Source/Core/Common/Src/OpenCL.h @@ -64,7 +64,7 @@ void Destroy(); cl_program CompileProgram(const char *Kernel); cl_kernel CompileKernel(cl_program program, const char *Function); -void HandleCLError(cl_int error, char* str = 0); +void HandleCLError(cl_int error, const char* str = 0); } #endif