diff --git a/GaudiAud/src/ProcStats.cpp b/GaudiAud/src/ProcStats.cpp index cb05b3c7f436c6473714e22ff33605d1fef70688..446c7459e5aa012c46ea854f55449d4347d35fce 100644 --- a/GaudiAud/src/ProcStats.cpp +++ b/GaudiAud/src/ProcStats.cpp @@ -198,41 +198,41 @@ (divide by sysconf(_SC_CLK_TCK). */ struct linux_proc { - int pid; + int pid{-1}; char comm[400]; char state; - int ppid; - int pgrp; - int session; - int tty; - int tpgid; - unsigned long flags; - unsigned long minflt; - unsigned long cminflt; - unsigned long majflt; - unsigned long cmajflt; - unsigned long utime; - unsigned long stime; - long cutime; - long cstime; - long priority; - long nice; - long num_threads; - long itrealvalue; - unsigned long long starttime; - unsigned long vsize; - long rss; - unsigned long rlim; - unsigned long startcode; - unsigned long endcode; - unsigned long startstack; - unsigned long kstkesp; - unsigned long kstkeip; - unsigned long signal; - unsigned long blocked; - unsigned long sigignore; - unsigned long sigcatch; - unsigned long wchan; + int ppid{-1}; + int pgrp{-1}; + int session{-1}; + int tty{-1}; + int tpgid{-1}; + unsigned long flags{0}; + unsigned long minflt{0}; + unsigned long cminflt{0}; + unsigned long majflt{0}; + unsigned long cmajflt{0}; + unsigned long utime{0}; + unsigned long stime{0}; + long cutime{0}; + long cstime{0}; + long priority{0}; + long nice{0}; + long num_threads{0}; + long itrealvalue{0}; + unsigned long long starttime{0}; + unsigned long vsize{0}; + long rss{0}; + unsigned long rlim{0}; + unsigned long startcode{0}; + unsigned long endcode{0}; + unsigned long startstack{0}; + unsigned long kstkesp{0}; + unsigned long kstkeip{0}; + unsigned long signal{0}; + unsigned long blocked{0}; + unsigned long sigignore{0}; + unsigned long sigcatch{0}; + unsigned long wchan{0}; }; #endif // __linux__ or __APPLE__ @@ -259,13 +259,13 @@ void ProcStats::open_ufd() { bool ProcStats::fetch( procInfo& f ) { if ( !m_valid ) { return false; } - std::scoped_lock lock{ m_mutex }; + std::scoped_lock lock{m_mutex}; #if defined( __linux__ ) or defined( __APPLE__ ) - double pr_size{ 0 }, pr_rssize{ 0 }; + double pr_size{0}, pr_rssize{0}; linux_proc pinfo; - int cnt{ 0 }; + int cnt{0}; char buf[500]; m_ufd.lseek( 0, SEEK_SET );