diff --git a/rocclr/runtime/device/pal/palkernel.cpp b/rocclr/runtime/device/pal/palkernel.cpp index 23dbc0fd3d..1e00ea844a 100644 --- a/rocclr/runtime/device/pal/palkernel.cpp +++ b/rocclr/runtime/device/pal/palkernel.cpp @@ -991,7 +991,7 @@ HSAILKernel::loadArguments( // Find all parameters for the current kernel for (auto arg : arguments_) { - const_address paramaddr; + const_address paramaddr = nullptr; if (arg->index_ != uint(-1)) { paramaddr = parameters + signature.at(arg->index_).offset_; } diff --git a/rocclr/runtime/device/rocm/rocvirtual.cpp b/rocclr/runtime/device/rocm/rocvirtual.cpp index 50b5f7c827..88431a36d1 100644 --- a/rocclr/runtime/device/rocm/rocvirtual.cpp +++ b/rocclr/runtime/device/rocm/rocvirtual.cpp @@ -1528,7 +1528,7 @@ VirtualGPU::submitKernelInternal( // Find all parameters for the current kernel for (auto arg : gpuKernel.hsailArgs()) { - const_address srcArgPtr; + const_address srcArgPtr = NULL; if (arg->index_ != uint(-1)) { srcArgPtr = parameters + signature.at(arg->index_).offset_; }