[Openmp-commits] [openmp] 1c822e1 - [libomptarget] Avoid unintialized GenericPluginTy::NumDevices
Ye Luo via Openmp-commits
openmp-commits at lists.llvm.org
Sat Aug 12 22:03:37 PDT 2023
Author: Ye Luo
Date: 2023-08-13T00:01:50-05:00
New Revision: 1c822e1e8278ebefdb7701249bdfe51f1ed03d7d
URL: https://github.com/llvm/llvm-project/commit/1c822e1e8278ebefdb7701249bdfe51f1ed03d7d
DIFF: https://github.com/llvm/llvm-project/commit/1c822e1e8278ebefdb7701249bdfe51f1ed03d7d.diff
LOG: [libomptarget] Avoid unintialized GenericPluginTy::NumDevices
Added:
Modified:
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
index b89ab3dd5f91c8..45104efef3b623 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
@@ -1001,7 +1001,7 @@ struct GenericPluginTy {
private:
/// Number of devices available for the plugin.
- int32_t NumDevices;
+ int32_t NumDevices = 0;
/// Array of pointers to the devices. Initially, they are all set to nullptr.
/// Once a device is initialized, the pointer is stored in the position given
More information about the Openmp-commits
mailing list