From f7b1591a5c9ad99a01fed263cac253f3988eaeaa Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 16 Aug 2020 15:41:20 -0700 Subject: [PATCH] SystemMonitor: Uninitialized struct member in ProcessModel, found by Coverity This is really a nop, as the cpu_percent is computed later. Zero the value just to keep things sane. --- Applications/SystemMonitor/ProcessModel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Applications/SystemMonitor/ProcessModel.cpp b/Applications/SystemMonitor/ProcessModel.cpp index 0c42295a5c..4360a9b077 100644 --- a/Applications/SystemMonitor/ProcessModel.cpp +++ b/Applications/SystemMonitor/ProcessModel.cpp @@ -394,6 +394,7 @@ void ProcessModel::update() state.sid = it.value.sid; state.times_scheduled = thread.times_scheduled; state.cpu = thread.cpu; + state.cpu_percent = 0; state.priority = thread.priority; state.effective_priority = thread.effective_priority; state.state = thread.state;