From e2789c149a0cbadab0a88deb9886b660d3bae485 Mon Sep 17 00:00:00 2001 From: Zjhjunhao <165575000+Zjhjunhao@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:08:50 +0800 Subject: [PATCH] Update read_rhog.cpp --- source/module_io/read_rhog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/module_io/read_rhog.cpp b/source/module_io/read_rhog.cpp index e25c1c97e17..13108d6913c 100644 --- a/source/module_io/read_rhog.cpp +++ b/source/module_io/read_rhog.cpp @@ -17,7 +17,10 @@ bool ModuleIO::read_rhog(const std::string& filename, const ModulePW::PW_Basis* Binstream ifs; bool error = false; - int gamma_only_in, npwtot_in, nspin_in, size; + int gamma_only_in = 0; + int npwtot_in = 0; + int nspin_in = 0; + int size = 0; double b1[3], b2[3], b3[3]; if (GlobalV::RANK_IN_POOL == 0)