Skip to content

Commit

Permalink
Fix CID 1393671 (Uninitialized scalar variable)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Jun 30, 2018
1 parent 8f33d10 commit 075dc98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opencl/openclwrapper.cpp
Expand Up @@ -2512,13 +2512,13 @@ static ds_status evaluateScoreForDevice(ds_device *device, void *inputData) {
device->type == DS_DEVICE_OPENCL_DEVICE ? "OpenCL" : "Native");
GPUEnv *env = nullptr;
if (device->type == DS_DEVICE_OPENCL_DEVICE) {
env = new GPUEnv;
env = &OpenclDevice::gpuEnv;
memset(env, 0, sizeof(*env));
// printf("[DS] populating tmp GPUEnv from device\n");
populateGPUEnvFromDevice(env, device->oclDeviceID);
env->mnFileCount = 0; // argc;
env->mnKernelCount = 0UL;
// printf("[DS] compiling kernels for tmp GPUEnv\n");
OpenclDevice::gpuEnv = *env;
OpenclDevice::CompileKernelFile(env, "");
}

Expand Down

0 comments on commit 075dc98

Please sign in to comment.