diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 1de0ef1e..83f37de1 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -505,7 +505,7 @@ namespace Cpu { const string sensor_name = "thermal" + to_string(i) + "/" + label; const int64_t temp = stol(readfile(basepath / "temp", "0")) / 1000; - int64_t high, crit; + int64_t high = 0, crit = 0; for (int ii = 0; fs::exists(basepath / string("trip_point_" + to_string(ii) + "_temp")); ii++) { const string trip_type = readfile(basepath / string("trip_point_" + to_string(ii) + "_type")); if (not is_in(trip_type, "high", "critical")) continue; @@ -1786,7 +1786,7 @@ namespace Mem { uint64_t get_totalMem() { ifstream meminfo(Shared::procPath / "meminfo"); - int64_t totalMem; + int64_t totalMem = 0; if (meminfo.good()) { meminfo.ignore(SSmax, ':'); meminfo >> totalMem;