diff --git a/level_zero/core/source/cmdlist/cmdlist.h b/level_zero/core/source/cmdlist/cmdlist.h index 3e21c86b12..22a96d8388 100644 --- a/level_zero/core/source/cmdlist/cmdlist.h +++ b/level_zero/core/source/cmdlist/cmdlist.h @@ -391,7 +391,7 @@ struct CommandList : _ze_command_list_handle_t { ze_command_list_flags_t flags = 0u; NEO::PreemptionMode commandListPreemptionMode = NEO::PreemptionMode::Initial; - NEO::EngineGroupType engineGroupType; + NEO::EngineGroupType engineGroupType = NEO::EngineGroupType::MaxEngineGroups; NEO::HeapAddressModel cmdListHeapAddressModel = NEO::HeapAddressModel::PrivateHeaps; uint32_t cmdListType = CommandListType::TYPE_REGULAR; diff --git a/level_zero/core/source/cmdqueue/cmdqueue_imp.h b/level_zero/core/source/cmdqueue/cmdqueue_imp.h index 26d4fa289a..a10e0f5f6c 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_imp.h +++ b/level_zero/core/source/cmdqueue/cmdqueue_imp.h @@ -58,7 +58,7 @@ struct CommandQueueImp : public CommandQueue { } private: - NEO::GraphicsAllocation *buffers[BUFFER_ALLOCATION::COUNT]; + NEO::GraphicsAllocation *buffers[BUFFER_ALLOCATION::COUNT]{}; std::pair flushId[BUFFER_ALLOCATION::COUNT]; BUFFER_ALLOCATION bufferUse = BUFFER_ALLOCATION::FIRST; }; diff --git a/level_zero/core/source/event/event.h b/level_zero/core/source/event/event.h index b69817f377..896d23323f 100644 --- a/level_zero/core/source/event/event.h +++ b/level_zero/core/source/event/event.h @@ -373,7 +373,7 @@ struct EventPool : _ze_event_pool_handle_t { uint32_t eventPackets = 0; uint32_t maxKernelCount = 0; - ze_event_pool_flags_t eventPoolFlags; + ze_event_pool_flags_t eventPoolFlags{}; bool isDeviceEventPoolAllocation = false; bool isHostVisibleEventPoolAllocation = false; diff --git a/level_zero/sysman/source/global_operations/linux/sysman_os_global_operations_imp.cpp b/level_zero/sysman/source/global_operations/linux/sysman_os_global_operations_imp.cpp index aac7675f23..d837257502 100644 --- a/level_zero/sysman/source/global_operations/linux/sysman_os_global_operations_imp.cpp +++ b/level_zero/sysman/source/global_operations/linux/sysman_os_global_operations_imp.cpp @@ -714,7 +714,7 @@ ze_result_t LinuxGlobalOperationsImp::scanProcessesState(std::vector(itr->first); process.memSize = itr->second.deviceMemStructField.deviceMemorySize; process.sharedSize = itr->second.deviceMemStructField.deviceSharedMemorySize; diff --git a/level_zero/tools/source/debug/windows/debug_session.h b/level_zero/tools/source/debug/windows/debug_session.h index e09d5cd73c..12d7a98343 100644 --- a/level_zero/tools/source/debug/windows/debug_session.h +++ b/level_zero/tools/source/debug/windows/debug_session.h @@ -117,8 +117,8 @@ struct DebugSessionWindows : DebugSessionImp { uint32_t size; }; - uint64_t debugAreaVA; - NEO::DebugAreaHeader debugArea; + uint64_t debugAreaVA{}; + NEO::DebugAreaHeader debugArea{}; std::atomic stateSaveAreaVA{0}; std::atomic stateSaveAreaSize{0}; bool stateSaveAreaCaptured = false; diff --git a/level_zero/tools/source/sysman/global_operations/linux/os_global_operations_imp.cpp b/level_zero/tools/source/sysman/global_operations/linux/os_global_operations_imp.cpp index 36437dc52f..dee4aa76b7 100644 --- a/level_zero/tools/source/sysman/global_operations/linux/os_global_operations_imp.cpp +++ b/level_zero/tools/source/sysman/global_operations/linux/os_global_operations_imp.cpp @@ -364,7 +364,7 @@ ze_result_t LinuxGlobalOperationsImp::scanProcessesState(std::vector/pid std::string realClientPidPath = clientsDir + "/" + clientId + "/" + "pid"; - uint64_t pid; + uint64_t pid{}; result = pSysfsAccess->read(realClientPidPath, pid); if (ZE_RESULT_SUCCESS != result) { @@ -471,7 +471,7 @@ ze_result_t LinuxGlobalOperationsImp::scanProcessesState(std::vector(itr->first); process.memSize = itr->second.deviceMemStructField.deviceMemorySize; process.sharedSize = itr->second.deviceMemStructField.deviceSharedMemorySize; diff --git a/shared/offline_compiler/source/utilities/linux/safety_guard_linux.h b/shared/offline_compiler/source/utilities/linux/safety_guard_linux.h index f3c02b6d4f..afc72a6547 100644 --- a/shared/offline_compiler/source/utilities/linux/safety_guard_linux.h +++ b/shared/offline_compiler/source/utilities/linux/safety_guard_linux.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -19,7 +19,7 @@ static jmp_buf jmpbuf; class SafetyGuardLinux { public: SafetyGuardLinux() { - struct sigaction sigact; + struct sigaction sigact {}; sigact.sa_sigaction = sigAction; sigact.sa_flags = SA_RESTART | SA_SIGINFO; @@ -72,6 +72,6 @@ class SafetyGuardLinux { typedef void (*callbackFunction)(); callbackFunction onSigSegv = nullptr; - struct sigaction previousSigSegvAction = {}; - struct sigaction previousSigIllvAction = {}; + struct sigaction previousSigSegvAction {}; + struct sigaction previousSigIllvAction {}; }; diff --git a/shared/source/compiler_interface/compiler_interface.h b/shared/source/compiler_interface/compiler_interface.h index c357caca43..5a22e038a2 100644 --- a/shared/source/compiler_interface/compiler_interface.h +++ b/shared/source/compiler_interface/compiler_interface.h @@ -154,16 +154,16 @@ class CompilerInterface { using fclDevCtxUptr = CIF::RAII::UPtr_t; std::unique_ptr igcLib; - CIF::RAII::UPtr_t igcMain = nullptr; + CIF::RAII::UPtr_t igcMain; std::map igcDeviceContexts; std::string igcRevision; - size_t igcLibSize; - time_t igcLibMTime; + size_t igcLibSize{}; + time_t igcLibMTime{}; std::unique_ptr fclLib; - CIF::RAII::UPtr_t fclMain = nullptr; + CIF::RAII::UPtr_t fclMain; std::map fclDeviceContexts; - CIF::RAII::UPtr_t fclBaseTranslationCtx = nullptr; + CIF::RAII::UPtr_t fclBaseTranslationCtx; MOCKABLE_VIRTUAL IGC::FclOclDeviceCtxTagOCL *getFclDeviceCtx(const Device &device); MOCKABLE_VIRTUAL IGC::IgcOclDeviceCtxTagOCL *getIgcDeviceCtx(const Device &device); diff --git a/shared/source/device/device.h b/shared/source/device/device.h index 1b9bda5beb..10b33141b5 100644 --- a/shared/source/device/device.h +++ b/shared/source/device/device.h @@ -213,7 +213,7 @@ class Device : public ReferenceTrackedObject { EngineGroupsT regularEngineGroups; std::vector subdevices; - PreemptionMode preemptionMode; + PreemptionMode preemptionMode = PreemptionMode::Disabled; ExecutionEnvironment *executionEnvironment = nullptr; aub_stream::EngineType engineInstancedType = aub_stream::EngineType::NUM_ENGINES; uint32_t defaultEngineIndex = 0; diff --git a/shared/source/utilities/software_tags_manager.h b/shared/source/utilities/software_tags_manager.h index 2cff590c5d..465c8a2818 100644 --- a/shared/source/utilities/software_tags_manager.h +++ b/shared/source/utilities/software_tags_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -48,7 +48,7 @@ class SWTagsManager { void allocateBXMLHeap(Device &device); void allocateSWTagHeap(Device &device); - MemoryManager *memoryManager; + MemoryManager *memoryManager{}; GraphicsAllocation *tagHeap = nullptr; GraphicsAllocation *bxmlHeap = nullptr; unsigned int currentHeapOffset = 0;