mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-10 17:30:12 +00:00
sprintf_s and strcpy_s breaks mac build, remove for now. If we want safe versions, we need to implement a btSprintf and byStrCpy version
This commit is contained in:
parent
d4c3633405
commit
10c300c7a0
@ -48,7 +48,8 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfo(
|
|||||||
assert(param_value_size>strlen(deviceName));
|
assert(param_value_size>strlen(deviceName));
|
||||||
if (nameLen < param_value_size)
|
if (nameLen < param_value_size)
|
||||||
{
|
{
|
||||||
sprintf_s((char*)param_value,param_value_size, "CPU");
|
const char* cpuName = "CPU";
|
||||||
|
sprintf((char*)param_value,"%s",cpuName);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
printf("error: param_value_size should be at least %d, but it is %d\n",nameLen,param_value_size);
|
printf("error: param_value_size should be at least %d, but it is %d\n",nameLen,param_value_size);
|
||||||
@ -322,7 +323,7 @@ CL_API_ENTRY cl_kernel CL_API_CALL clCreateKernel(cl_program program ,
|
|||||||
*errcode_ret = CL_INVALID_KERNEL_NAME;
|
*errcode_ret = CL_INVALID_KERNEL_NAME;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
strcpy_s(kernel->m_name, kernel_name);
|
strcpy(kernel->m_name, kernel_name);
|
||||||
kernel->m_numArgs = 0;
|
kernel->m_numArgs = 0;
|
||||||
|
|
||||||
//kernel->m_kernelProgramCommandId = scheduler->findProgramCommandIdByName(kernel_name);
|
//kernel->m_kernelProgramCommandId = scheduler->findProgramCommandIdByName(kernel_name);
|
||||||
@ -413,7 +414,8 @@ extern CL_API_ENTRY cl_int CL_API_CALL clGetContextInfo(cl_context /* co
|
|||||||
*param_value_size_ret = 13;
|
*param_value_size_ret = 13;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
sprintf_s((char*)param_value, param_value_size, "MiniCL_Test.");
|
const char* testName = "MiniCL_Test.";
|
||||||
|
sprintf((char*)param_value,"%s",testName);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user